I want to create a c++ class that I need to add an arbitrary number of items of type struct. So I thought I would have a private data member of type list (the standard template library list).
This is how I thought I would code it but I'm getting errors. Could someone explain why I can't do this and possibly describe someway I could accomplish this.
//my code
struct myStruct {
int a;
int b;
};
class myClass {
private:
list<myStruct> myList;
public:
//members not listed
};