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

C / C++ / MFC

 
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 
GeneralRe: #include problem Pin
John R. Shaw29-Jul-05 6:36
John R. Shaw29-Jul-05 6:36 
massad wrote:
shouldnt the compiler be able to know what all the classes area?

No. The order of the header files can be important. If a prototype in class1.h needs to know about a type defined in class2.h then class2.h normaly needs to be included before class1.h.

Most developers, now days, put a guard define# in there headers so that they will not be included twice (prevents include recursion). This also give you the advantage of allowing you to include any header files (w/guards) in any header file that needs the types defined in that header. It is also why C++ allows you to declare a class type, before it is define.

// class1.h
#ifndef _CLASS1_H_ // guard
#define _CLASS1_H_
#include "class2.h"
class class1 {...}
#endif // _CLASS1_H_

OR
// class1.h
#ifndef _CLASS1_H_ // guard
#define _CLASS1_H_
class class2; // forward declaration
class class1 {...}
#endif // _CLASS1_H_


INTP
"The more help VB provides VB programmers, the more miserable your life as a C++ programmer becomes."
Andrew W. Troelsen
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 
Generalline printing charset Pin
Anonymous (scp)29-Jul-05 4:56
sussAnonymous (scp)29-Jul-05 4:56 

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.