Click here to Skip to main content
15,846,726 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: C function call question. Pin
Chris Losinger11-Aug-17 4:36
professionalChris Losinger11-Aug-17 4:36 
GeneralRe: C function call question. Pin
samzcs11-Aug-17 4:50
samzcs11-Aug-17 4:50 
GeneralRe: C function call question. Pin
Chris Losinger11-Aug-17 4:52
professionalChris Losinger11-Aug-17 4:52 
GeneralRe: C function call question. Pin
samzcs11-Aug-17 5:22
samzcs11-Aug-17 5:22 
GeneralRe: C function call question. Pin
«_Superman_»14-Aug-17 16:50
professional«_Superman_»14-Aug-17 16:50 
GeneralRe: C function call question. Pin
Richard MacCutchan11-Aug-17 4:59
mveRichard MacCutchan11-Aug-17 4:59 
GeneralRe: C function call question. Pin
k505411-Aug-17 6:13
mvek505411-Aug-17 6:13 
GeneralRe: C function call question. Pin
k505411-Aug-17 11:35
mvek505411-Aug-17 11:35 
Further to this, in C the declaration void f(); does not declare a function with no parameters, but declares a function with an unknown number of parameters. If you know that a function takes no arguments, you should prototype it as void f(void);. Otherwise, the compiler will happily let you do the following:
C
void f();
int main(void)
{
    f();
    f(15);
    f("Hello", "World");
}

Using gcc I can compile the above with -Wall -Wextra, and get no warnings. If I add -Wstrict-prototypes, I do get the warning "function declaration isn’t a prototype [-Wstrict-prototypes]. If you're using MS-VSC, there's probably a similar warning flag that you can use.
AnswerRe: C function call question. Pin
Kornfeld Eliyahu Peter13-Aug-17 0:47
professionalKornfeld Eliyahu Peter13-Aug-17 0:47 
QuestionRe: C function call question. Pin
David Crow14-Aug-17 3:16
David Crow14-Aug-17 3:16 
AnswerRe: C function call question. Pin
Kornfeld Eliyahu Peter14-Aug-17 3:54
professionalKornfeld Eliyahu Peter14-Aug-17 3:54 
QuestionRe: C function call question. Pin
David Crow14-Aug-17 3:57
David Crow14-Aug-17 3:57 
AnswerRe: C function call question. Pin
Kornfeld Eliyahu Peter14-Aug-17 5:02
professionalKornfeld Eliyahu Peter14-Aug-17 5:02 
QuestionOut of Memory Exception in C++ Pin
divya0310-Aug-17 3:16
divya0310-Aug-17 3:16 
QuestionRe: Out of Memory Exception in C++ Pin
David Crow10-Aug-17 4:19
David Crow10-Aug-17 4:19 
AnswerRe: Out of Memory Exception in C++ Pin
divya0310-Aug-17 4:26
divya0310-Aug-17 4:26 
QuestionRe: Out of Memory Exception in C++ Pin
David Crow10-Aug-17 4:32
David Crow10-Aug-17 4:32 
AnswerRe: Out of Memory Exception in C++ Pin
divya0310-Aug-17 18:24
divya0310-Aug-17 18:24 
AnswerRe: Out of Memory Exception in C++ Pin
jeron110-Aug-17 4:54
jeron110-Aug-17 4:54 
GeneralRe: Out of Memory Exception in C++ Pin
divya0310-Aug-17 18:20
divya0310-Aug-17 18:20 
GeneralRe: Out of Memory Exception in C++ Pin
jeron111-Aug-17 5:21
jeron111-Aug-17 5:21 
AnswerRe: Out of Memory Exception in C++ Pin
SeattleC++11-Aug-17 11:31
SeattleC++11-Aug-17 11:31 
GeneralRe: Out of Memory Exception in C++ Pin
divya0313-Aug-17 20:03
divya0313-Aug-17 20:03 
GeneralRe: Out of Memory Exception in C++ Pin
SeattleC++14-Aug-17 6:03
SeattleC++14-Aug-17 6:03 
AnswerRe: Out of Memory Exception in C++ Pin
leon de boer12-Aug-17 20:00
leon de boer12-Aug-17 20:00 

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.