Quote Originally Posted by manav View Post
is it still needed in c++?
as you told me, c++ does need main to return. so can we not use void main in c++?
Because it's undefined. The standard says main must return int.
If you don't, it's all compiler dependant, or implementation dependant.
Visual Studio returns 0 while GCC returns garbage.