Click here to Skip to main content
15,897,371 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionwho can answer my question? Pin
liuty200618-Apr-03 22:45
liuty200618-Apr-03 22:45 
Generalproblem with a ToolBar Pin
cleathley@iinet18-Apr-03 20:21
cleathley@iinet18-Apr-03 20:21 
GeneralQuestion about friend function. Pin
George218-Apr-03 18:52
George218-Apr-03 18:52 
GeneralHomework alert!!! Pin
Taka Muraoka18-Apr-03 19:21
Taka Muraoka18-Apr-03 19:21 
GeneralRe: Homework alert!!! Pin
George218-Apr-03 19:26
George218-Apr-03 19:26 
GeneralRe: Homework alert!!! Pin
Taka Muraoka18-Apr-03 19:41
Taka Muraoka18-Apr-03 19:41 
GeneralRe: Homework alert!!! Pin
George218-Apr-03 20:29
George218-Apr-03 20:29 
GeneralRe: Homework alert!!! Pin
Taka Muraoka18-Apr-03 20:35
Taka Muraoka18-Apr-03 20:35 
Defining a function in a header simply tells the compiler that the function exists (somewhere else) and has the specified signature.

You need to do it so that the compiler won't flag an error when you try to use it. That's all. If you don't call that function, it won't make your EXE bigger.

Declaring it in a CPP file is *wrong* since it is easy to change the signature of the function and forget to update the other declarations. If you have it in a single place i.e. the header file, you are more likely to get it right. If you are using a C++ compiler, name-mangling means that the linker is likely to flag an error but it's still bad practice.





Software is everything. It also sucks. Charles Fishman [^]

Awasu 1.0.3 (beta)[^]: A free RSS reader with support for Code Project.

GeneralRe: Homework alert!!! Pin
George218-Apr-03 20:43
George218-Apr-03 20:43 
GeneralRe: Homework alert!!! Pin
Nish Nishant18-Apr-03 21:46
sitebuilderNish Nishant18-Apr-03 21:46 
GeneralRe: Homework alert!!! Pin
George218-Apr-03 21:56
George218-Apr-03 21:56 
GeneralRe: Homework alert!!! Pin
Nish Nishant19-Apr-03 6:34
sitebuilderNish Nishant19-Apr-03 6:34 
GeneralRe: Homework alert!!! Pin
George219-Apr-03 18:54
George219-Apr-03 18:54 
GeneralQuestion about type conversion operator. Pin
George218-Apr-03 18:48
George218-Apr-03 18:48 
GeneralRe: Question about type conversion operator. Pin
Michael Dunn18-Apr-03 19:47
sitebuilderMichael Dunn18-Apr-03 19:47 
GeneralRe: Question about type conversion operator. Pin
George218-Apr-03 20:25
George218-Apr-03 20:25 
GeneralFTP and P2P Pin
alex.barylski18-Apr-03 13:23
alex.barylski18-Apr-03 13:23 
QuestionProgrammatically creating resource dlls? Pin
IGx8918-Apr-03 12:13
IGx8918-Apr-03 12:13 
AnswerRe: Programmatically creating resource dlls? Pin
Joe Woodbury18-Apr-03 12:44
professionalJoe Woodbury18-Apr-03 12:44 
GeneralRe: Programmatically creating resource dlls? Pin
IGx8918-Apr-03 13:17
IGx8918-Apr-03 13:17 
GeneralRe: Programmatically creating resource dlls? Pin
Michael Dunn18-Apr-03 15:44
sitebuilderMichael Dunn18-Apr-03 15:44 
GeneralRe: Programmatically creating resource dlls? Pin
IGx8918-Apr-03 15:50
IGx8918-Apr-03 15:50 
GeneralRe: Programmatically creating resource dlls? Pin
Michael Dunn18-Apr-03 16:03
sitebuilderMichael Dunn18-Apr-03 16:03 
GeneralRe: Programmatically creating resource dlls? Pin
Tim Smith19-Apr-03 1:58
Tim Smith19-Apr-03 1:58 
AnswerRe: Programmatically creating resource dlls? Pin
Brian Shifrin18-Apr-03 16:29
Brian Shifrin18-Apr-03 16:29 

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.