:( Well if you were wondering..
The reason to use foo(void) in C and not in C++ is because C++ is stricter about how functions are called.In C, if you leave out the (void) part, you can call the function with any amount of arguments
Code:int foo();
// defined somewhere
// these are all valid, will not issue compiler errors
foo(1, 2, 3, 4, 5);
foo();
foo("hello", 1.2345, 1);
If you did declare it withthen all those would generate compiler errors. In C++Code:int foo(void)l
means the same asCode:int foo();
in C C++ will give out errors if you try and call the function with argumentsCode:int foo(void)