I am confused with how to use vectors in classes. For example if I have this header file
1 2 3 4 5 6 7 8 9 10
class vectorsoo{
public:
void addNumber(int); // adds number to the array
void removeNumber(int); // deletes the number from the array
void output(void); // prints the values of the array in sorted order
int vectorSize(void)const{return container.size();}; // returns vector size
private:
vector<int> container;
and then in main I try this:
1 2 3 4 5
vector<vectorsoo> vo;
int number;
cin >> number;
vo.addNumber(number);
it doesn't run, and says there is no member function addNumber. What am I doing wrong?