下面是代码:
AnsiString path = "BrowserBot.exe";
ShellExecute(0, TEXT("open"), path.c_str(), TEXT("-parametr"), 0, SW_SHOW);写入未定义AnsiString标识符的错误。我不知道问题出在哪里。
所有连接的图书馆:
#include <iostream>
#include <conio.h>
#include <Windows.h>
#include <fstream>
#include <sstream>发布于 2020-08-19 23:23:44
AnsiString是一个特定于C++Builder编译器的字符串类。如果使用该编译器,请确保在启用C++ Builder的VCL ()或FMX (FireMonkey)框架的情况下编译项目,并确保在C++代码中有相应的#include <vcl.h>或#include <fmx.h>语句。
否则,如果您正在使用任何其他编译器,则应该使用标准的C++ std::string类(也可以在C++Builder中使用),例如:
#include <string>
std::string path = "BrowserBot.exe";
ShellExecuteA(0, "open", path.c_str(), "-parametr", 0, SW_SHOW);https://stackoverflow.com/questions/63496216
复制相似问题