MisterX
- 758
- 71
estro said:You main function looks like this: int main (void), it means that your function must return an integer. [you can change it to void main (void), then you will not need any return...]
Actually, main implicitly returns 0 for C++, so (for the main function only) you may omit "return 0;"
void main(void) is not okay!
It is not what is specified by the standards.
The caller is expecting a return value, and that value should be 0 for success.
It could result in stack corruption.
Last edited: