#include <vector>
#include <string>
using namespace std;
Do you have the above in your code?
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I am currently trying to implement vectors and stacks on a c++ program with the vector declared in the class. When I have the vector defined as: "vector<string> firstName;" in the class under public, I am getting errors C2143, C4430, and C2334. Due to the vector not being able to be used, I also get C2039 throughout the program I am working on. What do you think is the problem? I have included the code for the class that is causing the problem below and if I need to show more, I can do that:
class Customers {
public :
vector <string> firstName;
int balance;
private:
protected:
};
#include <vector>
#include <string>
using namespace std;
Do you have the above in your code?