0
can't we use void main instead of int main in programs
#include <iostream> using namespace std; int main() { cout << "Hello world!"; return 0; }
1 Réponse
+ 15
In C++ NO, but C YES/NO (Don't take my word for it and study the following links)!
[https://stackoverflow.com/questions/449851/why-do-we-need-to-use-int-main-and-not-void-main-in-c]
[https://stackoverflow.com/questions/204476/what-should-main-return-in-c-and-c]