Folks,
So I was on the FAQ page (yes sometimes newbie's actually read it!!) to learn more about the main declarations...specifically the below thread.
http://faq.cprogramming.com/cgi-bin/...&id=1043284376
So for C++ I put down:-
Code:
int main(int argc, char *argv[])
Whereupon I got the below understandable warning from the compiler.
Code:
warning C4508: 'main' : function should return a value; 'void' return type assumed
So I added a return statement (as below), to the end of my main function.
And then I got the same warning and then the below error. Both of these messages seem to be in conflict of each other.
Code:
warning C4508: 'main' : function should return a value; 'void' return type assumed
error C2562: 'main' : 'void' function returning a value
see declaration of 'main'
I'm using VC++6.0 First it complains that main should be returning a value, and then when I return a value to complains again........any ideas why ?
Cheers
Starkhorn