ShellExecute问题,初学VC,请帮忙
// shell.cpp : Defines the entry point for the application.
//
#include "stdafx.h"
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
// TODO: Place code here.
char pathbuff[256];
ZeroMemory(pathbuff,256);
GetCurrentDirectory(256,pathbuff);
strcat(pathbuff,"\\");
ShellExecute(NULL,NULL,_T("freecell.exe"),NULL,pathbuff,SW_SHOW);
return 0;
}
编译后:
--------------------Configuration: shell - Win32 Release--------------------
Compiling...
shell.cpp
E:\vc\shell\shell.cpp(16) : error C2065: 'ShellExecute' : undeclared identifier
E:\vc\shell\shell.cpp(16) : error C2065: '_T' : undeclared identifier
Error executing cl.exe.
shell.exe - 2 error(s), 0 warning(s)