Question: Which of the following lines contains a syntax error? class Person { public: void SetNames(string n, string In) {name = n; lastName = In;

Which of the following lines contains a syntax error? class Person { 

Which of the following lines contains a syntax error? class Person { public: void SetNames(string n, string In) {name = n; lastName = In; } void PrintName() const; private: string name; string lastName; }; void Person::PrintName() const { name = name + lastName; cout < < name < < endl; return; } } int main() { Person p; p.SetNames ("Travis", "Jones"); p.PrintName(); return 0;

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The line that contains a syntax error is void SetNamesstring n string I... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!