"Goonigooguu" <he***************@btconnect.com> wrote...
Thanks all. Bloodsheds Dev-C++ works just fine but I do have other
question. Usually is start my main() as follows without a return:
void main()
{
//code body
}
This causes a problem with Dev-C++ and I have to use:
int main()
{
//code body
system("PAUSE")
return 0;
}
Is this a problem or normal. Please explain in laymans terms. Thanks.
In layman's terms, 'void main' is non-standard. If you want to write
_correct_ C++, you should use 'int main'. "return 0;" is unnecessary
from the main function; it will return 0 by default. Some compilers
have a problem with that. It's up to you to decide to use those
compilers and to put up with their non-compliance.
Dev-C++ causes the executable window to close before you can see the
results. That is why you need to use 'system("PAUSE")', which is not
guaranteed to work on all systems anyway. It is up to you to use the
tools that you've chosen in the way that helps you do your work. It
has nothing to do with the language.
Victor