改错(api)
程序代码:
#include<Windows.h> #include<stdio.h> int main(int argc,char *argv[]) { wchar_t *szCommandLine=L"cmd"; STARTUPINFO si={sizeof(si)}; PROCESS_INFORMATION pi; si.dwFlags=STARTF_USESHOWWINDOW; si.wShowWindow=TRUE; bool bRet=CreateProcess( NULL, szCommandLine, NULL, NULL, FALSE, CREATE_NEW_CONSOLE, NULL, NULL, &si, &pi); if(bRet) { CloseHandle(pi.hThread); CloseHandle(pi.hProcess); printf("新进程的ID号:%d\n",pi.dwProcessId); printf("新进程的主线程ID号:%d\n",pi.dwProcessId); } return 0; } error C2065: “bool”: 未声明的标识符 error C2146: 语法错误: 缺少“;”(在标识符“bRet”的前面) error C2065: “bRet”: 未声明的标识符 error C2065: “bRet”: 未声明的标识符帮我看看我该怎么改啊 ~~