New course! Every coder should learn Generative AI!
Try a free lesson0
What is the use of int main()
What if we use void main() and left the return 0 statement off?
1 Answer
+ 12
As of the latest standard, main() must return int. Void return type for main() has never been part of standard C++, and will not be supported by modern compilers.