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++ > class declarati...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 7 Topic 43330 of 48020
Post > Topic >>

class declaration?

by thomas <FreshThomas@[EMAIL PROTECTED] > Feb 14, 2008 at 09:19 PM

for the following two files, it has a problem of recursive inclusion.
Is there a mechanism like class declaration to solve the problem?

---header1.h---
#include "header2.h"

class class1{
public:
   void method1(class2 &ins);
};

--header2.h---
#include "header1.h"

class class2{
  class1 *ptr;
public:
  ...
};
 




 7 Posts in Topic:
class declaration?
thomas <FreshThomas@[E  2008-02-14 21:19:13 
Re: class declaration?
red floyd <no.spam@[EM  2008-02-14 22:08:50 
Re: class declaration?
lnitzu@[EMAIL PROTECTED]   2008-02-14 22:27:34 
Re: class declaration?
Juha Nieminen <nospam@  2008-02-15 11:52:36 
Re: class declaration?
Ian Collins <ian-news@  2008-02-15 23:14:54 
Re: class declaration?
Harish <bs.harish@[EMA  2008-02-15 01:44:05 
Re: class declaration?
Juha Nieminen <nospam@  2008-02-15 11:53:51 

Post A Reply:
  Go here to Signup

AddThis Feed Button


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

Contact
tan12V112 Tue Oct 14 8:41:59 CDT 2008.