A program question
Posted: 14 Apr 2011, 16:56
int main(int argc, char *argv[])
{
#if defined(DEBUG) && defined(__MINGW32__)
// Load mingw crash handler. Won't fail if dll is not present.
LoadLibrary("exchndl.dll");
//MessageBox(NULL,"hell0","world",0);
#endif
// Parse command line options
Client::Options options;
parseOptions(argc, argv, options);
if (/*options.printHelp*/true)
{
printHelp();
return 0;
}
else if (options.printVersion)
{
printVersion();
return 0;
}
initInternationalization();
// Initialize PhysicsFS
if (!PHYSFS_init(argv[0])) {
std::cout << "Error while initializing PhysFS: "
<< PHYSFS_getLastError() << std::endl;
return 1;
}
atexit((void(*)()) PHYSFS_deinit);
XML::init();
Client client(options);
return client.exec();
}
I'm a newer to use c::b, This is the main function of manaclient . I make some changes .
I want to see the result of printHelp() function.
but I didn't see what I wanted.
{
#if defined(DEBUG) && defined(__MINGW32__)
// Load mingw crash handler. Won't fail if dll is not present.
LoadLibrary("exchndl.dll");
//MessageBox(NULL,"hell0","world",0);
#endif
// Parse command line options
Client::Options options;
parseOptions(argc, argv, options);
if (/*options.printHelp*/true)
{
printHelp();
return 0;
}
else if (options.printVersion)
{
printVersion();
return 0;
}
initInternationalization();
// Initialize PhysicsFS
if (!PHYSFS_init(argv[0])) {
std::cout << "Error while initializing PhysFS: "
<< PHYSFS_getLastError() << std::endl;
return 1;
}
atexit((void(*)()) PHYSFS_deinit);
XML::init();
Client client(options);
return client.exec();
}
I'm a newer to use c::b, This is the main function of manaclient . I make some changes .
I want to see the result of printHelp() function.
but I didn't see what I wanted.