⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.cpp

📁 一个非常有用的开源代码
💻 CPP
字号:
// ********************************************************
// This is demo code. You may derive from, use, modify, and
// distribute it without limitation for any purpose.
// Obviously you don't get a warranty or an assurance of
// fitness for a particular purpose with this code. Your
// welcome to remove this header and claim original
// authorship. I really don't care.
// ********************************************************

#include "MainMenu.h"
#include "Gui.h"
#include <time.h>
#include "../GClasses/GApp.h"


void ShowWafflesMainMenu()
{
	MainMenuController c;
	c.RunModal();
}


int main(int argc, char *argv[])
{
	// Seed the random number generator
	time_t t;
	srand((unsigned int)time(&t));

	// Exceptions are better than signals
	GApp::TurnSegFaultsIntoExceptions();

	// Find the app path
	ControllerBase::SetAppPath(GApp::GetApplicationPath(argv[0]));

	// Show the main menu
	try
	{
		ShowWafflesMainMenu();
	}
	catch(const char* szError)
	{
		printf("%s\n", szError);
	}
	catch(const wchar_t* wszError)
	{
#ifdef WIN32
		wprintf(L"%ls\n", wszError);
#else
		ConvertUnicodeToAnsi(wszError, szError);
		printf("%s\n", szError);
#endif
	}

	return 0;
}


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -