我在C ++中有以下脚本:
#include <iostream>
#include <vector>
using namespace std;
int main() {
vector <string> markus = { "M", "A", "R", "K", "U", "S" };
for (int i = 0; i < markus.size();i++) {
cout << markus[i];
}
return 0;
}
我已经成功安装了g ++。当我尝试使用命令g++ -o test test.cpp
编译此代码时,我没有错误。但是,当我尝试使用命令test.exe
运行创建的test
文件时,我收到错误消息“无法找到起始点”。首先,有一个很长的序列,然后是以下消息; “无法在动态链接库中找到该过程的起点”,以及test.exe
的绝对路径。
如果我删除#include <vector>
,请尝试以下代码;
#include <iostream>
using namespace std;
int main() {
cout << "Hello world";
return 0;
}
,它很完美。
我很乐意帮助你。