Click here to Skip to main content
15,898,374 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questioncomport; never reaches EOF? Pin
quarry_0629-Jul-05 9:15
quarry_0629-Jul-05 9:15 
QuestionMFC Dll in non-MFC app? Pin
Anacreon29-Jul-05 7:55
Anacreon29-Jul-05 7:55 
AnswerOne other note Pin
Anacreon29-Jul-05 8:25
Anacreon29-Jul-05 8:25 
AnswerRe: MFC Dll in non-MFC app? Pin
Michael Dunn29-Jul-05 9:46
sitebuilderMichael Dunn29-Jul-05 9:46 
GeneralRe: MFC Dll in non-MFC app? Pin
Anacreon29-Jul-05 10:07
Anacreon29-Jul-05 10:07 
GeneralRe: MFC Dll in non-MFC app? Pin
Anacreon29-Jul-05 10:27
Anacreon29-Jul-05 10:27 
GeneralRe: MFC Dll in non-MFC app? Pin
Anacreon29-Jul-05 10:44
Anacreon29-Jul-05 10:44 
General#include problem Pin
massad29-Jul-05 6:03
massad29-Jul-05 6:03 
This seems like a straightforward problem but I am totally stumped and just can't figure it out. It seems that whenever some changes are made in some of the classes in my project (Specifically a newly added function takes a parameter of a different type class from the Project), the "location" of the include line for that class must be changed inside the "stdafx.h". Otherwise the compiler complains that it does not know what the Object being passed in is.

Here's an example:

[stdafx.h]

#include "class1.h" //the order of files here seems to cause problems.
#include "class2.h"

[class1.h]

#include "stdafx.h"
..... //some code

void Test(Class2* pClass); << //C2061 error occurs on this line saying it does not know what Class2 is!!!!

However if I switched around class2.h to be followed by class1.h in the stdafx.h there would be no problem.

Maybe I am doing something wrong but if I put all the include files into the stdafx.h and them simply include it in every class header file, shouldnt the compiler be able to know what all the classes area?

Any help is greatly appreciated.

Sincerely,

Ilya
GeneralRe: #include problem Pin
John R. Shaw29-Jul-05 6:36
John R. Shaw29-Jul-05 6:36 
GeneralRe: #include problem Pin
massad29-Jul-05 6:50
massad29-Jul-05 6:50 
GeneralRe: #include problem Pin
John R. Shaw29-Jul-05 7:07
John R. Shaw29-Jul-05 7:07 
GeneralRe: #include problem Pin
Bob Stanneveld29-Jul-05 7:41
Bob Stanneveld29-Jul-05 7:41 
GeneralRe: #include problem Pin
Anacreon29-Jul-05 7:58
Anacreon29-Jul-05 7:58 
GeneralRe: #include problem Pin
David Crow29-Jul-05 8:26
David Crow29-Jul-05 8:26 
GeneralRe: #include problem Pin
sunit529-Jul-05 20:48
sunit529-Jul-05 20:48 
QuestionVC++ 2003 NET apps without NET installed? Pin
gunrunnerjohn29-Jul-05 5:16
gunrunnerjohn29-Jul-05 5:16 
AnswerRe: VC++ 2003 NET apps without NET installed? Pin
S. Senthil Kumar29-Jul-05 5:22
S. Senthil Kumar29-Jul-05 5:22 
GeneralRe: VC++ 2003 NET apps without NET installed? Pin
gunrunnerjohn29-Jul-05 5:40
gunrunnerjohn29-Jul-05 5:40 
GeneralRe: VC++ 2003 NET apps without NET installed? Pin
Trollslayer29-Jul-05 12:33
mentorTrollslayer29-Jul-05 12:33 
GeneralRe: VC++ 2003 NET apps without NET installed? Pin
GuoChunLiang29-Jul-05 17:14
GuoChunLiang29-Jul-05 17:14 
GeneralSolved: VC++ 2003 NET apps without NET installed? Pin
gunrunnerjohn30-Jul-05 7:58
gunrunnerjohn30-Jul-05 7:58 
AnswerRe: VC++ 2003 NET apps without NET installed? Pin
McClamm29-Jul-05 5:49
McClamm29-Jul-05 5:49 
GeneralRe: VC++ 2003 NET apps without NET installed? Pin
gunrunnerjohn29-Jul-05 7:33
gunrunnerjohn29-Jul-05 7:33 
GeneralRe: VC++ 2003 NET apps without NET installed? Pin
Judah Gabriel Himango29-Jul-05 8:14
sponsorJudah Gabriel Himango29-Jul-05 8:14 
GeneralRe: VC++ 2003 NET apps without NET installed? Pin
gunrunnerjohn29-Jul-05 8:30
gunrunnerjohn29-Jul-05 8:30 

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.