You sure you want to say that on this board? There are quite a few of "int main" buffs on this board who insist on having an int main function and the return. Besides, I dont know what compiler you use, but not putting the return 0 will give you errors and/or warnings in every single compiler I have used, so it is needed unless you are using a void main, which is not the correct way to do things.No return 0 needed because C++ implicitly returns 0.
I have used about 6 different C++ compilers and have yet to find one that does not support getch().getch( ) is both non-standard and not needed
Not all compilers follow that standard. Also, several times iostream and iostream.h are two completely different things. For example, one time I was using the standard vector class (vector.h) in a program of mine, and decided to just tell it to include vector instead of vector.h. Well when I did that I ended getting many errors. I opened up vector, and I opened up vector.h, and they were two totally different files...vector.h turned out to be the updated one, vector was just an old junked up version that was out of date. I then looked at iostream and iostream.h, and the same case occurred there.iostream.h isn't supported by the standard anymore, make that iostream
I like placing the .h on mine. In my opinion it is the proper way. It states that it is a header file. Putting no extension leaves so amount of obscureness and uneasiness in me. I have yet to hear that iostream.h is not standard anymore.
Oh yes it does...go try it.No endl needed because the BASIC script doesn't print one either (I think).
I know I already addressed this one...but I wanted to say one more thing about it. Not needed? What makes you think it is not needed? It would do you very much good to use it. I know some compilers (like M$ VC++) automatically wait for a keypress at the end of console programs to close down the console program, and therefore the getch at the end of the program is not needed, but the majority of compilers, from what I have seen, do not do that. Therefore to prevent the compiler from building, running, and closing your application almost simultaneously (this is in the case of a simple console app like this one, I am not talking about more complicated apps), you need the getch to be able to make it stop and wait for a key press and the end of the program before it shuts down the console window.getch( ) is both non-standard and not needed