heyOriginally posted by Dante Shamest
Yes, technically, you can. The following code is valid:
Code:int main() {}
i wrote a very simple program just to test that
my compiler is Visual Studio 6Code:#include<iostream> using namespace std; int main() { int x; cout<<"enter number :\n"; cin>>x; cout<<"number is :"<<x<<endl; }
the program runs very well and it works but during compiling it gives errors which is
E:\Program Files\Microsoft Visual Studio\MyProjects\34\h.cpp(9) : warning C4508: 'main' : function should return a value; 'void' return type assumed
Linking...
34.exe - 0 error(s), 1 warning(s)