首页 > 解决方案 > vs代码不加载向量库的问题

问题描述

我正在做一个在线课程来尝试在 vs 代码中使用 c++ 构建一个地牢爬虫,但是在导入矢量库时它不会让我使用任何矢量命令或功能,我已经检查了我的编译器设置和一切似乎都很好,我一辈子都无法找出问题所在。

#include <vector>
#include "Item.h"
#include "GameCharacter.h"

#ifndef ROOM_H
#define ROOM_H

using namespace std;

class Room
{
public:
    int pos;
    bool isExit;
    vector<Item> items;
    vector<GameCharacter> enemies;
    Room(int, bool, vector<Item>, vector<GameCharacter>);
    void clearLoot();
    void clearEnemies();
};

#endif

智能感知似乎根本没有捡起它,但其余的代码似乎很好。

使用mingw在windows上运行vs代码

标签: c++vectorvisual-studio-code

解决方案


推荐阅读