Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Doing object-oriented programming. Put a class in a separate header file. Keep getting error: string does not name a type. Already tried putting std::string does
Doing object-oriented programming. Put a class in a separate header file. Keep getting error: "string does not name a type". Already tried putting std::string does NOT work. Help please.
#ifndef ACCOUNT H INCLUDED 2 3 define ACCOUNT H INCLUDED class Account private: int accountNumber; string ownerName double balance; 10 11 public 12 13 14 15 16 17 void setAccountNumber (int); void setownerName #endif // ACCOUNT H INCLUDED File Line Message C: \Users\ste... 8 C: \Users\ste... 13 C:\Users\ste..13 === Build: Debug in HW6-1-55 (compiler: GNU GCC Compiler) === error: 'string' does not name a type error: variable or field 'setOwnerName declared void error: expected 'at end of member declaration Build failed: 3 error(s), 0 warning (s) (0 minute (s), 0 second (s))Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started