调用ShellExecute,说我未申明头文件。。。。
的有关信息介绍如下:#include <windows.h>
#include <iostream>
#include <string.h>
#include <stdlib.h>
#include <tlhelp32.h> // 声明快照函数的头文件
using namespace std;
//#pragma comment( linker, "/subsystem:\"windows\" /entry:\"mainCRTStartup\"" )
int main(int argc, char* argv[])
{
char join[]="\"";
char begin[128];
::GetCurrentDirectory(100,begin);
char end[]="\\Maxthon.exe";
strcat(begin,end);
strcat(begin,join);
strcat(join,begin);
::ShellExecute(NULL,"open",join, NULL,NULL,SW_SHOW );
printf("%s\n",join);
return 0;
}
右键点工程名,选设置,然后选c/c++属性页,再选catagory选单中选 precompiled header ,将选项置成no use 或者autometic