Click here to Skip to main content
16,018,460 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: pass by reference error Pin
Bram van Kampen24-Feb-07 15:12
Bram van Kampen24-Feb-07 15:12 
QuestionAbout CLSID??? Pin
siddharthsan23-Feb-07 1:49
siddharthsan23-Feb-07 1:49 
QuestionRe: About CLSID??? Pin
prasad_som23-Feb-07 6:01
prasad_som23-Feb-07 6:01 
QuestionGlobal hook Pin
tigger_am23-Feb-07 1:47
tigger_am23-Feb-07 1:47 
AnswerRe: Global hook Pin
PJ Arends23-Feb-07 10:05
professionalPJ Arends23-Feb-07 10:05 
Questionabout linking obj files Pin
sawerr23-Feb-07 0:52
sawerr23-Feb-07 0:52 
AnswerRe: about linking obj files Pin
toxcct23-Feb-07 0:56
toxcct23-Feb-07 0:56 
AnswerRe: about linking obj files Pin
Cedric Moonen23-Feb-07 0:57
Cedric Moonen23-Feb-07 0:57 
Because your compiler first check if the function is declared somewhere. It is needed, that's why you need to include files in your cpp files.

What you could do is abuse the compiler in this way: declare the function (provide a functino prototype) but don't define it (no function body).

#include 
using namespace std;

//Function prototype:
void foo(int);

int main()
{ int x = 0; 
foo(x);
return 0;
}


In this way the compiler sees that the function exists so it won't complain. But the linker will complain because you didn't provide a body.


Cédric Moonen
Software developer

Charting control [v1.1]

AnswerRe: about linking obj files Pin
Newbie0023-Feb-07 1:09
Newbie0023-Feb-07 1:09 
QuestionCReBar border question. Pin
PatrykDabrowski23-Feb-07 0:28
PatrykDabrowski23-Feb-07 0:28 
QuestionTrying to pass an array Pin
ericelysia22-Feb-07 23:57
ericelysia22-Feb-07 23:57 
AnswerRe: Trying to pass an array Pin
Cedric Moonen23-Feb-07 0:47
Cedric Moonen23-Feb-07 0:47 
AnswerRe: Trying to pass an array Pin
Newbie0023-Feb-07 0:59
Newbie0023-Feb-07 0:59 
QuestionVisual Studio Installer Error Pin
Mahesha_m22-Feb-07 23:42
Mahesha_m22-Feb-07 23:42 
QuestionVS2005 Pin
Anilkumar K V22-Feb-07 23:40
Anilkumar K V22-Feb-07 23:40 
AnswerRe: VS2005 Pin
Cedric Moonen22-Feb-07 23:51
Cedric Moonen22-Feb-07 23:51 
GeneralRe: VS2005 Pin
Anilkumar K V23-Feb-07 0:27
Anilkumar K V23-Feb-07 0:27 
GeneralRe: VS2005 Pin
Rajesh R Subramanian23-Feb-07 0:40
professionalRajesh R Subramanian23-Feb-07 0:40 
GeneralRe: VS2005 Pin
Cedric Moonen23-Feb-07 0:40
Cedric Moonen23-Feb-07 0:40 
GeneralRe: VS2005 Pin
toxcct23-Feb-07 0:52
toxcct23-Feb-07 0:52 
GeneralRe: VS2005 Pin
Rajesh R Subramanian23-Feb-07 3:11
professionalRajesh R Subramanian23-Feb-07 3:11 
GeneralRe: VS2005 Pin
toxcct24-Feb-07 0:52
toxcct24-Feb-07 0:52 
GeneralRe: VS2005 Pin
Nibu babu thomas23-Feb-07 3:25
Nibu babu thomas23-Feb-07 3:25 
AnswerRe: VS2005 Pin
Mark Salsbery23-Feb-07 8:45
Mark Salsbery23-Feb-07 8:45 
GeneralRe: VS2005 Pin
Hamid Taebi23-Feb-07 19:24
professionalHamid Taebi23-Feb-07 19:24 

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.