Click here to Skip to main content
16,008,010 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Philosophical question Pin
ColinDavies2-Nov-02 9:43
ColinDavies2-Nov-02 9:43 
GeneralRe: Philosophical question Pin
Gary R. Wheeler3-Nov-02 4:29
Gary R. Wheeler3-Nov-02 4:29 
GeneralRe: Philosophical question Pin
Chris Losinger2-Nov-02 9:49
professionalChris Losinger2-Nov-02 9:49 
GeneralRe: Philosophical question Pin
Chris Losinger3-Nov-02 5:33
professionalChris Losinger3-Nov-02 5:33 
GeneralRe: Philosophical question Pin
markkuk2-Nov-02 12:49
markkuk2-Nov-02 12:49 
GeneralRe: Philosophical question Pin
Chris Losinger2-Nov-02 13:34
professionalChris Losinger2-Nov-02 13:34 
GeneralRe: Philosophical question Pin
Anonymous4-Nov-02 4:17
Anonymous4-Nov-02 4:17 
GeneralRe: Philosophical question Pin
Gary R. Wheeler5-Nov-02 10:41
Gary R. Wheeler5-Nov-02 10:41 
Hmm. I think I see where the confusion lies. With C++ and overloading, you're right. Having foo.h does not guarantee that the implementation in foo.cpp will be verified by the compiler, unless you use the 'extern "C"' construct. I believe Visual C++ compiles sources named .C as if they are 'extern "C"' by default.

In any case, I think it's better stylistically to have a header file than not. Other people looking at the code will expect to see it. If you don't include the header file, then other folks reading the code will have to look at each use of the function(s) to see how they are used. Also, I normally consider the header file to describe the controls for a black box (the 'interface' to the black box) while the source file is the 'implementation' of the black box. I then document changes to the interface in the header file, and changes to the implementation in the source file.

Just my $0.02.


Software Zen: delete this;
QuestionDoes anyone know this error?? Pin
Pett2-Nov-02 8:50
Pett2-Nov-02 8:50 
AnswerRe: Does anyone know this error?? Pin
Anonymous2-Nov-02 13:42
Anonymous2-Nov-02 13:42 
GeneralRe: Does anyone know this error?? Pin
Pett3-Nov-02 4:48
Pett3-Nov-02 4:48 
QuestionNewbie question - C++ 6.0 Pro or Standard? Pin
jta2-Nov-02 8:17
jta2-Nov-02 8:17 
AnswerRe: Newbie question - C++ 6.0 Pro or Standard? Pin
ian mariano2-Nov-02 10:04
ian mariano2-Nov-02 10:04 
GeneralI/O Completion Port and Queue Status :: Winsock Pin
valikac2-Nov-02 8:04
valikac2-Nov-02 8:04 
GeneralRe: I/O Completion Port and Queue Status :: Winsock Pin
ian mariano2-Nov-02 10:09
ian mariano2-Nov-02 10:09 
Generalexplicit linking to DLLs Pin
tUpp2-Nov-02 7:32
tUpp2-Nov-02 7:32 
GeneralRe: explicit linking to DLLs Pin
ian mariano2-Nov-02 14:00
ian mariano2-Nov-02 14:00 
GeneralToolBar Pin
sikrip2-Nov-02 6:55
sikrip2-Nov-02 6:55 
GeneralRe: ToolBar Pin
includeh102-Nov-02 7:07
includeh102-Nov-02 7:07 
GeneralDispatchMessage vs own function Pin
S van Leent2-Nov-02 4:55
S van Leent2-Nov-02 4:55 
GeneralRe: DispatchMessage vs own function Pin
ian mariano2-Nov-02 6:38
ian mariano2-Nov-02 6:38 
GeneralRe: DispatchMessage vs own function Pin
S van Leent2-Nov-02 10:12
S van Leent2-Nov-02 10:12 
GeneralRe: DispatchMessage vs own function Pin
Paul M Watt2-Nov-02 10:14
mentorPaul M Watt2-Nov-02 10:14 
GeneralRe: DispatchMessage vs own function Pin
S van Leent2-Nov-02 10:21
S van Leent2-Nov-02 10:21 
GeneralRe: DispatchMessage vs own function Pin
ian mariano2-Nov-02 15:19
ian mariano2-Nov-02 15:19 

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.