trouble creating two user created class type vectors...

I'm making a game and running into a weird problem.... I'm trying to make a vector of pointers to another class I created, "character" class. I'm actually trying to make two, but for some reason it won't let me make two, one of them raises the error "vector does not name a type" but if I comment either one of them out then the other will work just find. Any idea why?? Heres the code.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include "Character.h"
#ifndef GAMEBASE_H
#define GAMEBASE_H


class GameBase
{
    public:
        GameBase();
        void initialize_teams();
        void Move ( const short x, const short y );
        void Battle ( int index_attack, int index_defend );
        void
    protected:
    private:
        vector<Character*> Team_One;
        vector<Character*> Team_Two;
        Board* field;

#endif // GAMEBASE_H 

I tried adding scope operator but it didn't work either. I'm at a loss, I was excited to get away from arrays because of the convenience but this is not more convenient as of yet lol.

edit: thanks for the help everybody.. I didn't know that it required namespace std to work. yup
Last edited on
I lied it actually doesn't work at all. I seriously have no idea why it's not working. This is my first time trying to use vectors so I could just be doing something wrong. An array of type pointer to characters works just fine. Is storing user created types in vectors not a feature my compiler supports maybe??
#include <vector>
Topic archived. No new replies allowed.