#include <iostream>
class World
{
public:
World() { std::cout << "Hello!\n"; }
~World() {std::cout << "Good Bye!\n"; }
};
World TheWorld;
void main() {}
A rare question
The problem is the void return of main, it''s not standard.
The standard only allows two forms of "main":
int main(void);
or
int main(int argc, char *argv[]);
Kami no Itte ga ore ni zettai naru!
The standard only allows two forms of "main":
int main(void);
or
int main(int argc, char *argv[]);
Kami no Itte ga ore ni zettai naru!
<nitpicking>
Technically the standard allows more forms of main than that, but all forms should have an int return-type.
</nitpicking>
-Neophyte
Technically the standard allows more forms of main than that, but all forms should have an int return-type.
</nitpicking>
-Neophyte
just do whatever compiles for the main and forgetaboutit, useful command line parameters in games are few and far
Most of the time the IDE writes it for you anyway
Most of the time the IDE writes it for you anyway
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement