Click here to Skip to main content
15,903,012 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: PROJECT PROBLEM Pin
amaneet23-May-06 1:34
amaneet23-May-06 1:34 
GeneralRe: PROJECT PROBLEM Pin
Nibu babu thomas23-May-06 1:37
Nibu babu thomas23-May-06 1:37 
GeneralRe: PROJECT PROBLEM Pin
toxcct23-May-06 1:52
toxcct23-May-06 1:52 
QuestionAPI Program Pin
MHASSANF23-May-06 0:05
MHASSANF23-May-06 0:05 
AnswerRe: API Program Pin
toxcct23-May-06 0:09
toxcct23-May-06 0:09 
AnswerRe: API Program Pin
Hamid_RT23-May-06 0:14
Hamid_RT23-May-06 0:14 
AnswerRe: API Program Pin
ThatsAlok23-May-06 1:05
ThatsAlok23-May-06 1:05 
Questionproblem with #include of one another referencing classes Pin
boogalo7923-May-06 0:02
boogalo7923-May-06 0:02 
Hello,

I'm having to classes with inverse assotiations, which means one has to include the other. But neither my MSVC nor my GNU compiler doesn't handle that. I don't understand why?

MSVC Compiler error: Syntax error: identifier 'B'
Syntax error: identifier 'A'

GNU Compiler error: variable or field 'foo' declared void
expected ';' before '(' token

Here is a code example:
// A.h ----
#ifndef A_H
#define A_H

#include "B.h"

class A
{
public:
   A(void);
   virtual ~A(void);
   void foo(B* b);
};
#endif
// B.h ----
#ifndef B_H
#define B_H

#include "A.h"

class B
{
public:
   B(void);
   ~B(void);
   void foo(A* a);
};
#endif 



Thank's for your replies,

boogalo
AnswerRe: problem with #include of one another referencing classes Pin
Cedric Moonen23-May-06 0:14
Cedric Moonen23-May-06 0:14 
AnswerRe: problem with #include of one another referencing classes Pin
Laxman Auti23-May-06 0:18
Laxman Auti23-May-06 0:18 
GeneralRe: problem with #include of one another referencing classes Pin
sunit523-May-06 1:02
sunit523-May-06 1:02 
GeneralRe: problem with #include of one another referencing classes Pin
ThatsAlok23-May-06 2:57
ThatsAlok23-May-06 2:57 
GeneralRe: problem with #include of one another referencing classes Pin
boogalo7923-May-06 1:30
boogalo7923-May-06 1:30 
AnswerRe: problem with #include of one another referencing classes Pin
_anil_23-May-06 1:18
_anil_23-May-06 1:18 
QuestionRegarding DIB and Palettes Pin
nOm|23-May-06 0:01
nOm|23-May-06 0:01 
QuestionInline functions Pin
-Dy22-May-06 23:45
-Dy22-May-06 23:45 
GeneralRe: Inline functions Pin
Maxwell Chen22-May-06 23:52
Maxwell Chen22-May-06 23:52 
QuestionI want to add my application in Firewall allow list ( Modified) Pin
zahid_ash22-May-06 23:43
zahid_ash22-May-06 23:43 
AnswerRe: I want to add my application in Firewall allow list ( Modified) Pin
Laxman Auti23-May-06 0:10
Laxman Auti23-May-06 0:10 
AnswerRe: I want to add my application in Firewall allow list ( Modified) Pin
Kelly Herald23-May-06 14:06
Kelly Herald23-May-06 14:06 
QuestionHow Can I play the music on my game Pin
Squallkin8422-May-06 23:38
Squallkin8422-May-06 23:38 
JokeRe: How Can I play the music on my game Pin
Nibu babu thomas23-May-06 0:30
Nibu babu thomas23-May-06 0:30 
GeneralRe: How Can I play the music on my game Pin
Squallkin8423-May-06 4:09
Squallkin8423-May-06 4:09 
Questionhow can i use this "FindFirstFile( )" on MAC Pin
baldha rakesh22-May-06 23:38
baldha rakesh22-May-06 23:38 
GeneralRe: how can i use this "FindFirstFile( )" on MAC Pin
Laxman Auti22-May-06 23:52
Laxman Auti22-May-06 23:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.