+ 2

what is the difference

Void main(){ } And Int main(){ return 0; } Can someone help me pleas☺️

16th Sep 2017, 2:23 AM
SAKTAN ALAZMI
SAKTAN ALAZMI - avatar
2 ответов
+ 6
The return types are different. A function with a void return type will not return a value. While with int as the return type, the function will return an int. int main() is the standard for the main function, returning the value allows confirmation that the program ended successfully. void main() should probably be avoided in C++.
16th Sep 2017, 2:34 AM
Rrestoring faith
Rrestoring faith - avatar