定义成标准头
int main(int argc, char *argv[])
argv[i]
非标准
int main() {
PWSTR cmdLine = GetCommandLineW();
int argc;
PWSTR *argv = CommandLineToArgvW(cmdLine, &argc);
}
//参数使用
if (argc==3)
{
if (strcmp(argv[0], "-e")==0)
{
iMode = 1;
}
else if (strcmp(argv[0], "-d")==0)
{
iMode =2;
}
sInput=argv[1];
sOutput=argv[2];
}
_tmain
Unicode下就是wmain
否则就是main
[参考]
http://stackoverflow.com/questions/16706632/c-tchar-to-stdstring