C++;编译器错误:isoc++;禁止申报‘;设置’;没有类型 我在C++中有一些代码,其中MIN .CPP包含文件SimuleGr.h。当我尝试编译时,我得到: In file included from main.cpp:9: SimpleGraph.h:201: error: ISO C++ forbids declaration of ‘set’ with no type SimpleGraph.h:201: error: invalid use of ‘::’ SimpleGraph.h:201: error: expected ‘;’ before ‘<’ token 在main.cpp:9中包含的文件中: SimeGr.h:201:错误:ISO C++禁止声明“没有”类型的SET SimpleGraph.h:201:错误:对“:”的使用无效 SimpleGraph.h:201:错误:应为“;”在“
之前,您需要C++;编译器错误:isoc++;禁止申报‘;设置’;没有类型 我在C++中有一些代码,其中MIN .CPP包含文件SimuleGr.h。当我尝试编译时,我得到: In file included from main.cpp:9: SimpleGraph.h:201: error: ISO C++ forbids declaration of ‘set’ with no type SimpleGraph.h:201: error: invalid use of ‘::’ SimpleGraph.h:201: error: expected ‘;’ before ‘<’ token 在main.cpp:9中包含的文件中: SimeGr.h:201:错误:ISO C++禁止声明“没有”类型的SET SimpleGraph.h:201:错误:对“:”的使用无效 SimpleGraph.h:201:错误:应为“;”在“,c++,compiler-errors,set,C++,Compiler Errors,Set,之前,您需要\include使用std::set您需要\include使用std::set您需要\include。您需要\include。请显示更多的头文件,问题可能不是来自这些行本身。(包括,对吗?)请退出使用那些不推荐使用的C头。请显示更多的头文件,问题可能不是来自这些行本身。(包括,对吗?)请退出使用那些不推荐使用的C头。还有你自己。 std::set<int> getConvexHullPoints() const {return convexHullPoints;} #i
\include
使用std::set
您需要\include
使用std::set
您需要\include
。您需要\include
。请显示更多的头文件,问题可能不是来自这些行本身。(包括
,对吗?)请退出使用那些不推荐使用的C头。请显示更多的头文件,问题可能不是来自这些行本身。(包括
,对吗?)请退出使用那些不推荐使用的C头。还有你自己。
std::set<int> getConvexHullPoints() const {return convexHullPoints;}
#include <iostream>
#include <fstream>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <math.h>
#include <vector>
#include "SimpleGraph.h"
using namespace std;
...then the main body of the program
#include <set>