c/c++ void arguments

Started by
10 comments, last by n3odymium 20 years, 12 months ago
quote:Original post by BRooksWackerman
means that void my_function(void); is the same as void my_function();

Careful! They are equivalent in C++, but not in C.
Advertisement
If I remember correctly, C treats it differently to C++.

given the function:
void DoStuff(){    //rah} 

C interprets this as a function with a variable number of arguments, C++ treats it as a function with no arguments.


"I pretend to work, they pretend to pay me."

[edited by - MadLep on April 22, 2003 9:23:59 PM]
"I pretend to work, they pretend to pay me."

This topic is closed to new replies.

Advertisement