作者:初始化 | 来源:互联网 | 2023-12-12 10:21
转载自:http://blog.csdn.net/xgx198831/article/details/8828653
// ================================= 接收参数程序
#include "stdafx.h"
#include
//#include
#include
int main(int argc, char* argv[])
{
char szCommand[64]={0};
char *pStr = szCommand;
pStr = GetCommandLine();
printf("Hello World!\n");
printf("command.......... : %s\n", pStr);
getchar();
return 0;
}
// ======================= bat 文件
echo off
start batParam.exe innnnnnnnnnnnnnnnnnnnnnn
// ================================= 运行结果
Hello World!
command.......... : batParam.exe innnnnnnnnnnnnnnnnnnnnnn