+ 2
what is the difference
Void main(){ } And Int main(){ return 0; } Can someone help me pleas☺️
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++.