Click here to Skip to main content
15,887,596 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionLink error _imp_ Pin
ewpendleton26-Oct-07 6:44
ewpendleton26-Oct-07 6:44 
QuestionRe: Link error _imp_ Pin
Hamid_RT26-Oct-07 7:02
Hamid_RT26-Oct-07 7:02 
AnswerRe: Link error _imp_ Pin
ewpendleton26-Oct-07 9:26
ewpendleton26-Oct-07 9:26 
AnswerRe: Link error _imp_ Pin
Chris Losinger26-Oct-07 9:15
professionalChris Losinger26-Oct-07 9:15 
Questioncompile error,please help me, Pin
nhathoang26-Oct-07 5:48
nhathoang26-Oct-07 5:48 
AnswerRe: compile error,please help me, Pin
Mark Salsbery26-Oct-07 5:56
Mark Salsbery26-Oct-07 5:56 
GeneralRe: compile error,please help me, Pin
nhathoang26-Oct-07 7:21
nhathoang26-Oct-07 7:21 
GeneralRe: compile error,please help me, Pin
Mark Salsbery26-Oct-07 7:53
Mark Salsbery26-Oct-07 7:53 
Please reread my response.

It doesn't matter if you use MFC or not, or if you use header files or not.

The compiler is going to parse the code from the top-down. To resolve the
circular reference problem, you have to have similar code to the code I posted
and it needs to be in that order.

Again, this will not work:

class X
{
Y Y1 <-- the compiler does NOT know what a Y object is here!!!
}
class Y
{
X X1
}

You could try this, but it won't work either:

class Y;
class X
{
Y Y1 <-- the compiler does NOT know what SIZE a Y object is here!!!
}
class Y
{
X X1
}

So, you must use a pointer.  The compiler knows the size of a pointer:

class Y;
class X
{
Y *pY1
}
class Y
{
X X1
}




Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

GeneralRe: compile error,please help me, Pin
nhathoang26-Oct-07 8:37
nhathoang26-Oct-07 8:37 
GeneralRe: compile error,please help me, Pin
Mark Salsbery26-Oct-07 8:53
Mark Salsbery26-Oct-07 8:53 
JokeRe: compile error,please help me, Pin
David Crow26-Oct-07 9:21
David Crow26-Oct-07 9:21 
GeneralRe: compile error,please help me, Pin
Mark Salsbery26-Oct-07 9:36
Mark Salsbery26-Oct-07 9:36 
GeneralRe: compile error,please help me, Pin
nhathoang26-Oct-07 10:05
nhathoang26-Oct-07 10:05 
GeneralRe: compile error,please help me, Pin
Fernando A. Gomez F.26-Oct-07 18:08
Fernando A. Gomez F.26-Oct-07 18:08 
GeneralRe: compile error,please help me, Pin
nhathoang26-Oct-07 21:55
nhathoang26-Oct-07 21:55 
GeneralRe: compile error,please help me, Pin
Mark Salsbery27-Oct-07 7:02
Mark Salsbery27-Oct-07 7:02 
GeneralRe: compile error,please help me, Pin
nhathoang27-Oct-07 8:09
nhathoang27-Oct-07 8:09 
QuestionRuntimeError: Invalid argument to sendto (plz help me out) Pin
majid mahmood26-Oct-07 5:16
majid mahmood26-Oct-07 5:16 
AnswerRe: RuntimeError: Invalid argument to sendto (plz help me out) Pin
Mark Salsbery26-Oct-07 6:12
Mark Salsbery26-Oct-07 6:12 
QuestionCreating a large DC Pin
Meisterzunge26-Oct-07 4:23
Meisterzunge26-Oct-07 4:23 
AnswerRe: Creating a large DC Pin
Chris Losinger26-Oct-07 4:45
professionalChris Losinger26-Oct-07 4:45 
QuestionRe: Creating a large DC Pin
bob1697226-Oct-07 4:46
bob1697226-Oct-07 4:46 
QuestionRe: Creating a large DC Pin
Hamid_RT26-Oct-07 7:30
Hamid_RT26-Oct-07 7:30 
AnswerRe: Creating a large DC Pin
Meisterzunge26-Oct-07 11:03
Meisterzunge26-Oct-07 11:03 
GeneralRe: Creating a large DC Pin
Meisterzunge26-Oct-07 11:22
Meisterzunge26-Oct-07 11:22 

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.