Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
103 views
in Technique[技术] by (71.8m points)

c++ - Issue with vs code not loading vector library

I'm doing an online course to try and build a dungeon crawler using c++ in vs code, however when importing the vector library it won't let me use any of the vector commands or features, I've checked my compiler set up and everything seems okay and can't for the life of me find out what's wrong.

#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

intellisense doesn't seem to pick it up at all, but the rest of the code seems fine.

running vs code on windows with mingw

question from:https://stackoverflow.com/questions/65829947/issue-with-vs-code-not-loading-vector-library

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...