一:
创建一个空项目,添加一个cpp文件,并添加如下代码:
#include <tchar.h>
#include <Windows.h>
using namespace std;
int WINAPI _tWinMain( HINSTANCE,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nShowCmd )
{
MessageBox(NULL, lpCmdLine, _T("命令行参数"), 0);
return 0;
}
#include <tchar.h>
#include <Windows.h>
using namespace std;
int WINAPI _tWinMain( HINSTANCE,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nShowCmd )
{
MessageBox(NULL, lpCmdLine, _T("命令行参数"), 0);
return 0;
}