Click here to Skip to main content
16,005,339 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: HELP ME!!! Pin
Anonymous15-Mar-05 1:45
Anonymous15-Mar-05 1:45 
GeneralRe: HELP ME!!! Pin
ThatsAlok14-Mar-05 18:51
ThatsAlok14-Mar-05 18:51 
GeneralRe: HELP ME!!! Pin
fire1234515-Mar-05 0:52
fire1234515-Mar-05 0:52 
GeneralRe: HELP ME!!! Pin
Anonymous15-Mar-05 1:46
Anonymous15-Mar-05 1:46 
GeneralRe: HELP ME!!! Pin
ThatsAlok15-Mar-05 3:10
ThatsAlok15-Mar-05 3:10 
GeneralNeed Help for Writing WebService Client Pin
covansys200014-Mar-05 17:28
covansys200014-Mar-05 17:28 
GeneralUSEAGE OF FUNCTION AND DECLARATION OF FUNCTION IN CPP Pin
phijophlip14-Mar-05 17:27
phijophlip14-Mar-05 17:27 
GeneralRe: USEAGE OF FUNCTION AND DECLARATION OF FUNCTION IN CPP Pin
S. Senthil Kumar14-Mar-05 18:09
S. Senthil Kumar14-Mar-05 18:09 
You've pretty clearly said what the difference is. C++ requires the prototype of the function before it is used. In the first case, you've defined the function itself before its use, so it compiled fine. In the next case, the compiler was not able to see the prototype for fun() when it was used in main(), so it complained.

In C, you can get away without declaring a function if the function takes no parameter and returns an int. The C compiler assumes that prototype if it doesn't see one. That is not legal in C++ though.

Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
GeneralRe: USEAGE OF FUNCTION AND DECLARATION OF FUNCTION IN CPP Pin
namaskaaram14-Mar-05 18:55
namaskaaram14-Mar-05 18:55 
GeneralRedraw Bitmap Window Message Pin
LighthouseJ14-Mar-05 16:46
LighthouseJ14-Mar-05 16:46 
GeneralRe: Redraw Bitmap Window Message Pin
PJ Arends14-Mar-05 17:05
professionalPJ Arends14-Mar-05 17:05 
GeneralRe: Redraw Bitmap Window Message Pin
Michael Dunn14-Mar-05 17:34
sitebuilderMichael Dunn14-Mar-05 17:34 
GeneralRe: Redraw Bitmap Window Message Pin
namaskaaram14-Mar-05 18:39
namaskaaram14-Mar-05 18:39 
GeneralRe: Redraw Bitmap Window Message Pin
Anand for every one14-Mar-05 19:48
Anand for every one14-Mar-05 19:48 
QuestionIs there anyone who knows Trojans??? Pin
Jack.Fu14-Mar-05 14:07
Jack.Fu14-Mar-05 14:07 
AnswerRe: Is there anyone who knows Trojans??? Pin
Christian Graus14-Mar-05 14:21
protectorChristian Graus14-Mar-05 14:21 
GeneralRe: Is there anyone who knows Trojans??? Pin
Steve Mayfield14-Mar-05 14:28
Steve Mayfield14-Mar-05 14:28 
GeneralRe: Is there anyone who knows Trojans??? Pin
Christian Graus14-Mar-05 16:23
protectorChristian Graus14-Mar-05 16:23 
AnswerRe: Is there anyone who knows Trojans??? Pin
ThatsAlok15-Mar-05 0:39
ThatsAlok15-Mar-05 0:39 
AnswerRe: Is there anyone who knows Trojans??? Pin
Ravi Bhavnani15-Mar-05 3:00
professionalRavi Bhavnani15-Mar-05 3:00 
GeneralVS6 and MSDN Pin
quantum6914-Mar-05 13:09
quantum6914-Mar-05 13:09 
GeneralRe: VS6 and MSDN Pin
David Crow15-Mar-05 3:10
David Crow15-Mar-05 3:10 
GeneralRe: VS6 and MSDN Pin
quantum6916-Mar-05 15:14
quantum6916-Mar-05 15:14 
GeneralRead sector Pin
Y_R14-Mar-05 11:54
Y_R14-Mar-05 11:54 
GeneralRe: Read sector Pin
Ravi Bhavnani15-Mar-05 3:02
professionalRavi Bhavnani15-Mar-05 3:02 

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.