First, using an external global object within a class (like your vector<int> numbers within Course ) sounds like a bad design.

Second, what problem do you have with the code you have posted?