Why am i getting errors C2143, C4430, and C2334?

ZMccluer 21 Reputation points
2022-07-14T18:52:11+00:00

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:

};

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,637 questions
0 comments No comments
{count} votes

Accepted answer
  1. RLWA32 43,381 Reputation points
    2022-07-14T19:47:14.87+00:00
       #include <vector>  
       #include <string>  
       using namespace std;  
    

    Do you have the above in your code?

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful