Map of class objects

I am attempting to create a class that holds a map of objects of another class, as seen below:
1
2
3
4
5
6
7
8
9
10
class roster
{
    public:
    protected:
    private:
    std::map<std::string, rosterMember*> data;
};

class rosterMember
{ ... }


However I am getting errors saying that rosterMember has not been declared in this scope and that template arguments 2 and 4 are invalid. Is there a certain way I have to go about doing this?
You must forward declare the rosterMember class. See http://www.learncpp.com/cpp-tutorial/17-forward-declarations/ .
Topic archived. No new replies allowed.