Click here to Skip to main content
16,005,178 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: redirecting files Pin
Christian Graus6-Feb-02 15:44
protectorChristian Graus6-Feb-02 15:44 
GeneralRe: redirecting files Pin
6-Feb-02 16:02
suss6-Feb-02 16:02 
GeneralRe: redirecting files Pin
Christian Graus6-Feb-02 16:31
protectorChristian Graus6-Feb-02 16:31 
GeneralRe: redirecting file Pin
6-Feb-02 16:03
suss6-Feb-02 16:03 
GeneralRe: redirecting file Pin
Joaquín M López Muñoz6-Feb-02 22:10
Joaquín M López Muñoz6-Feb-02 22:10 
Generalarrays Pin
6-Feb-02 15:04
suss6-Feb-02 15:04 
GeneralRe: arrays Pin
Tim Smith6-Feb-02 15:15
Tim Smith6-Feb-02 15:15 
GeneralCircular reference in header file Pin
Mr.Freeze6-Feb-02 15:02
Mr.Freeze6-Feb-02 15:02 
Hi,

Imagine you have two classes with the following headers:

//***************** Class CFirstClass ****************
#include "SecondClass.h"
class CFirstClass
{
public:
CFirstClass();
virtual ~CFirstClass();
CSecondClass* pointer;
};

//***************** Class CSecondClass ****************
#include "FirstClass.h"
class CSecondClass
{
public:
CSecondClass();
virtual ~CSecondClass();
CFirstClass* pointer;
};

We have a situation of a circular reference and I don't know to handle that problem. I tried with a forwarding instead of '#include "SecondClass.h"', but I get the error: 'use of undefined type 'CSecondClass'' !!!
My concret problem is much more complex but I think I can summarize it with the above description. Does someone know how to solve this easily? (without building the second class into the first one)

Thanks for your help Smile | :)



GeneralRe: Circular reference in header file Pin
Tim Smith6-Feb-02 15:08
Tim Smith6-Feb-02 15:08 
GeneralRe: Circular reference in header file Pin
Mr.Freeze6-Feb-02 15:22
Mr.Freeze6-Feb-02 15:22 
GeneralRe: Circular reference in header file Pin
Tim Smith6-Feb-02 15:26
Tim Smith6-Feb-02 15:26 
GeneralRe: Circular reference in header file Pin
Mr.Freeze6-Feb-02 15:43
Mr.Freeze6-Feb-02 15:43 
GeneralRe: Any code analyzers? Pin
6-Feb-02 14:48
suss6-Feb-02 14:48 
GeneralRe: Any code analyzers? Pin
Tim Smith6-Feb-02 15:12
Tim Smith6-Feb-02 15:12 
GeneralA problem! Pin
wabc6-Feb-02 13:58
wabc6-Feb-02 13:58 
GeneralRe: A problem! Pin
Christian Graus6-Feb-02 14:24
protectorChristian Graus6-Feb-02 14:24 
QuestionCAsyncSocket will recv all packets in one recv? Pin
AnonymousBabe@usa.net6-Feb-02 13:49
AnonymousBabe@usa.net6-Feb-02 13:49 
AnswerRe: CAsyncSocket will recv all packets in one recv? Pin
Tim Smith6-Feb-02 15:27
Tim Smith6-Feb-02 15:27 
GeneralRe: CAsyncSocket will recv all packets in one recv? Pin
AnonymousBabe@usa.net6-Feb-02 16:32
AnonymousBabe@usa.net6-Feb-02 16:32 
GeneralRe: CAsyncSocket will recv all packets in one recv? Pin
markkuk6-Feb-02 20:35
markkuk6-Feb-02 20:35 
AnswerRe: CAsyncSocket will recv all packets in one recv? Pin
AnonymousBabe@usa.net6-Feb-02 21:33
AnonymousBabe@usa.net6-Feb-02 21:33 
GeneralRe: CAsyncSocket will recv all packets in one recv? Pin
6-Feb-02 22:16
suss6-Feb-02 22:16 
GeneralRe: CAsyncSocket will recv all packets in one recv? Pin
Peter Weyzen7-Feb-02 10:10
Peter Weyzen7-Feb-02 10:10 
Generalconverting Pin
6-Feb-02 13:26
suss6-Feb-02 13:26 
GeneralRe: converting Pin
Christian Graus6-Feb-02 13:51
protectorChristian Graus6-Feb-02 13:51 

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.