我曾尝试在 StackOverflow 上搜索此问题,但答案似乎并不奏效。 这是我的头文件之一:(Hero.h) #pragma once class Hero { public: Hero(); std::string name; int experience; int neededExperience; int health; int strength; int level; int speed; std::vector<Item> items = std::vector<Item>(); ...
错误C2653: 'std' : 不是类或命名空间名称 C++ // Compile Options: /GX#include<cstdlib>voidmain(){std::exit(0); } 但是,尝试编译以下内容会导致编译器显示以下错误: 错误C2039: “exit” : 不是 “std” 的成员 C++ // Compile Options: /GX#include<vector>#include<cstdlib>...
error C2039: “ac_strlen”: 不是 “std” 的成员 vs2019编译cgal5.5出现的错误, vc14.2-x...
将<vector>包含在您的Hero.h头文件中,并考虑将其从您的Hero.cpp文件中删除,如下面的注释所述。
错误C2039:'getID':不是'std :: vector< _ty>'的成员与[_ty =学生] 错误C2039:'getModule':不是'std :: vector< _ty>'的成员与[_ty =学生] main.cpp. #include<iostream> #include<fstream> #include<string> #include<vector> #include<sstream> ...
错误C2039:“exit”:不是“std”的成员 C++ // Compile Options: /GX#include<vector>#include<cstdlib>voidmain(){std::exit(0); } 在第一种情况下,将显示 C2653,因为尚未定义命名空间std。 第二种情况显示 C2039,因为命名空间std已定义(在标头<vector>中),但该函数exit不是该命名空间的一部分。 若要...