Click here to Skip to main content
15,920,030 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Header files #include problem Pin
Peter Weyzen3-Nov-07 19:13
Peter Weyzen3-Nov-07 19:13 
GeneralRe: Header files #include problem Pin
Vaclav_4-Nov-07 5:30
Vaclav_4-Nov-07 5:30 
GeneralRe: Header files #include problem Pin
Peter Weyzen4-Nov-07 6:36
Peter Weyzen4-Nov-07 6:36 
GeneralRe: Header files #include problem Pin
Bram van Kampen4-Nov-07 11:49
Bram van Kampen4-Nov-07 11:49 
GeneralRe: Header files #include problem Pin
Bram van Kampen4-Nov-07 11:11
Bram van Kampen4-Nov-07 11:11 
GeneralRe: Header files #include problem Pin
Oliver1234-Nov-07 11:33
Oliver1234-Nov-07 11:33 
GeneralRe: Header files #include problem Pin
Bram van Kampen4-Nov-07 12:17
Bram van Kampen4-Nov-07 12:17 
GeneralRe: Header files #include problem Pin
Oliver1235-Nov-07 14:23
Oliver1235-Nov-07 14:23 
I combined the header files and everything works.

First I created class X with X.cpp and X.h
Then created class Y with Y.cpp, but changed the default header file to X.h. So both class X and class Y had their headers in the same file. Forward reference worked.

Both X and Y are created in Z. Z then passes pointers to X and Y by invoking a function of X and a function of Y.

In X, a pointer to Y allows me to execute Y functions.
In Y, a pointer to X allows me to execute X functions.

The only peculiarity is when creating functions in Y. I right click Y in the class window in the workspace, then select ADD MEMBER FUNCTION. The new function is declared in class Y in file X.h, but the implememtation goes into X.cpp. Deleting the skeleton implementtion in X, and pasting it into Y.cpp solves the problem.

Thanks for the help.
Question4 bit datatype? Pin
_NielsB3-Nov-07 8:56
_NielsB3-Nov-07 8:56 
AnswerRe: 4 bit datatype? Pin
David Crow3-Nov-07 11:55
David Crow3-Nov-07 11:55 
GeneralRe: 4 bit datatype? Pin
Bram van Kampen3-Nov-07 13:04
Bram van Kampen3-Nov-07 13:04 
QuestionChanging resource in a dll Pin
Imtiaz Murtaza3-Nov-07 8:14
Imtiaz Murtaza3-Nov-07 8:14 
AnswerRe: Changing resource in a dll Pin
Peter Weyzen3-Nov-07 18:58
Peter Weyzen3-Nov-07 18:58 
QuestionRemoving the scrollbars from a CFormView derived class Pin
Sternocera3-Nov-07 7:17
Sternocera3-Nov-07 7:17 
AnswerRe: Removing the scrollbars from a CFormView derived class Pin
Nelek4-Nov-07 21:36
protectorNelek4-Nov-07 21:36 
GeneralRe: Removing the scrollbars from a CFormView derived class Pin
Sternocera4-Nov-07 22:05
Sternocera4-Nov-07 22:05 
GeneralRe: Removing the scrollbars from a CFormView derived class Pin
Nelek4-Nov-07 23:48
protectorNelek4-Nov-07 23:48 
Questionflexgrid or any grid VC++ 2003 Pin
Rhymhoont3-Nov-07 6:30
Rhymhoont3-Nov-07 6:30 
QuestionTimer Triggers Pin
thes3cr3t13-Nov-07 4:56
thes3cr3t13-Nov-07 4:56 
AnswerRe: Timer Triggers Pin
Nelek7-Nov-07 4:01
protectorNelek7-Nov-07 4:01 
QuestionCreateProcess returns Error 1450 - No sufficient resources to complete requested service Pin
vipin_nvk3-Nov-07 4:52
vipin_nvk3-Nov-07 4:52 
AnswerRe: CreateProcess returns Error 1450 - No sufficient resources to complete requested service Pin
bob169723-Nov-07 6:40
bob169723-Nov-07 6:40 
Questioncan I Read multi keys from keyboard using Visual C++ 2005? Pin
allooba3-Nov-07 3:11
allooba3-Nov-07 3:11 
QuestionRe: can I Read multi keys from keyboard using Visual C++ 2005? Pin
David Crow3-Nov-07 3:42
David Crow3-Nov-07 3:42 
AnswerRe: can I Read multi keys from keyboard using Visual C++ 2005? Pin
allooba3-Nov-07 7:02
allooba3-Nov-07 7:02 

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.