Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C++ > function call w...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 4 Topic 43870 of 47561
Post > Topic >>

function call without creating object

by Eric Kaplan <tobycraftse@[EMAIL PROTECTED] > Mar 12, 2008 at 09:29 PM

in C++ you can call function / methods without creating an object of
that Class?

like the the following, it calls Update() + Draw() functions by Class
name CInterfaceGroup + CContainer.

In Java, one can only call method by Class name if it is static
method.

In C++, you can call any function without creating an Object like -
CContainer * cc = new CContainer;
cc->Draw();

=========================

CGraphicsGroup::~CGraphicsGroup() {
}

void CGraphicsGroup::Create() {

}

void CGraphicsGroup::Update() {
	CInterfaceGroup::Update();
}

void CGraphicsGroup::Draw() {
	CContainer::Draw();
}
 




 4 Posts in Topic:
function call without creating object
Eric Kaplan <tobycraft  2008-03-12 21:29:10 
Re: function call without creating object
hurcan solter <hsolter  2008-03-12 23:54:05 
Re: function call without creating object
Christian Hackl <hacki  2008-03-13 13:30:40 
Re: function call without creating object
Joe Greer <jgreer@[EMA  2008-03-13 13:31:02 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Sep 7 4:23:07 CDT 2008.