C:\Users\Chay Hawk\Desktop\Gun Shop\Customer_Class.h|13|warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11 [enabled by default]|
C:\Users\Chay Hawk\Desktop\Gun Shop\Customer_Class.h|13|error: expected type-specifier before 'vector'|
C:\Users\Chay Hawk\Desktop\Gun Shop\Customer_Class.h|13|error: cannot convert 'int*' to 'std::vector<std::basic_string<char> >*' in initialization|
C:\Users\Chay Hawk\Desktop\Gun Shop\Customer_Class.h|13|error: expected ';' before 'vector'|
||=== Build finished: 3 errors, 1 warnings (0 minutes, 0 seconds) ===|
As the warning says: if not using c++11, you can't initialise variables in the declaration, unless the variable is static.
Apart form that, it is probably not a good idea (or no need) to have a pointer to an STL container. Just use a reference instead.
When using new, whatever type you have on the right of new has to match the type of the variable on the left side of =. But it is probably best to steer clear of pointers.
Why are you sending a std::vector<std::string> as an argument (in the constructor) to your Customer object? Perhaps the Customer should HAVE these as member variables?
So I would recommend that you decide what data your customer should store, have those as member variables, then create an interface of public functions.
Now you will have to "customize" your copy constructor and assignment operator to ensure that your Customer class doesn't do a shallow copy of the vector.
If you go with C++11 you may need to look into the move constructor and move operator as well (although I think any decent compiler should automagically create them correctly).
And then, the extra burden of delete'ing your vector pointer, this is best done in the destructor.
Further to my last post, there is the concept of a class just for the data (Customer class), and then separately a container to put the data objects in (All the customers). This could be an STL container in main() or even another class.