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

C / C++ / MFC

 
GeneralRe: tons of awful errors Pin
Jake Palmer10-Aug-01 11:02
Jake Palmer10-Aug-01 11:02 
GeneralSource .CPP and Header .H Pin
10-Aug-01 10:06
suss10-Aug-01 10:06 
GeneralRe: Source .CPP and Header .H Pin
Carlos Antollini10-Aug-01 10:54
Carlos Antollini10-Aug-01 10:54 
GeneralRe: Source .CPP and Header .H Pin
10-Aug-01 11:50
suss10-Aug-01 11:50 
GeneralRe: Source .CPP and Header .H Pin
Carlos Antollini10-Aug-01 12:07
Carlos Antollini10-Aug-01 12:07 
GeneralRe: Source .CPP and Header .H Pin
10-Aug-01 12:14
suss10-Aug-01 12:14 
GeneralRe: Source .CPP and Header .H Pin
Stefan Pedersen11-Aug-01 14:23
Stefan Pedersen11-Aug-01 14:23 
GeneralRe: Source .CPP and Header .H Pin
Michael Dunn10-Aug-01 15:46
sitebuilderMichael Dunn10-Aug-01 15:46 
While it's certainly possible to put code in header files (ATL and WTL do this) it's more efficient at build time to not do so.
Imagine a big project, say 100 CPP files. There's one header file, call it "funcs.h", that has the code for some utility functions. Every CPP file uses at least one utility function, so they all #include funcs.h.
Now suppose you fix a bug in a utility function. Next build, every CPP file must be recompiled because they all depend on the header file.
If you put the code into its own funcs.cpp file, only that file needs to be compiled.

There's also the whole issue of implementation hiding in C++. And commercial libraries that ship header files obviously don't put their code in the publically-available header files.

--Mike--
http://home.inreach.com/mdunn/
"Make sure that if you are using a blow torch that you don't set anything on fire."
  -- Chris Maunder
GeneralRe: Source .CPP and Header .H Pin
10-Aug-01 23:07
suss10-Aug-01 23:07 
Questionhow to find a word in a string... Pin
10-Aug-01 9:33
suss10-Aug-01 9:33 
AnswerRe: how to find a word in a string... Pin
Jake Palmer10-Aug-01 9:40
Jake Palmer10-Aug-01 9:40 
AnswerRe: how to find a word in a string... Pin
10-Aug-01 9:40
suss10-Aug-01 9:40 
AnswerRe: how to find a word in a string... Pin
#realJSOP10-Aug-01 9:42
professional#realJSOP10-Aug-01 9:42 
GeneralRe: how to find a word in a string... Pin
11-Aug-01 1:10
suss11-Aug-01 1:10 
Questiontree controled options page w/o mfc? Pin
10-Aug-01 8:36
suss10-Aug-01 8:36 
AnswerRe: tree controled options page w/o mfc? Pin
Michael Dunn10-Aug-01 9:20
sitebuilderMichael Dunn10-Aug-01 9:20 
Generalcompiler not recognizing dialog ID Pin
Jake Palmer10-Aug-01 7:44
Jake Palmer10-Aug-01 7:44 
GeneralRe: compiler not recognizing dialog ID Pin
Carlos Antollini10-Aug-01 7:56
Carlos Antollini10-Aug-01 7:56 
GeneralRe: compiler not recognizing dialog ID Pin
Jake Palmer10-Aug-01 8:49
Jake Palmer10-Aug-01 8:49 
GeneralRe: compiler not recognizing dialog ID Pin
Carlos Antollini10-Aug-01 9:38
Carlos Antollini10-Aug-01 9:38 
QuestionCDC ?? Pin
otvac10-Aug-01 4:56
otvac10-Aug-01 4:56 
Generaltransparent listbox Pin
10-Aug-01 4:50
suss10-Aug-01 4:50 
GeneralRe: transparent listbox Pin
Tomasz Sowinski10-Aug-01 4:55
Tomasz Sowinski10-Aug-01 4:55 
GeneralRe: transparent listbox Pin
#realJSOP10-Aug-01 6:26
professional#realJSOP10-Aug-01 6:26 
GeneralRe: transparent listbox Pin
Tomasz Sowinski10-Aug-01 6:34
Tomasz Sowinski10-Aug-01 6:34 

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.