Question: I'm having a problem with my code and would like some help with it. This is my code: #include using namespace std; class Table {

 I'm having a problem with my code and would like some

I'm having a problem with my code and would like some help with it.

This is my code:

#include using namespace std;

class Table { public: void SetSeatA( int personA ); void SetSeatB( int personB ); int GetSeatA(); int GetSeatB(); void SwapSeats(); private: int seatA; int seatB; };

int main(){ Table t; int person; cin >> person; t.SetSeatA(person); cin >> person; t.SetSeatB(person); t.SwapSeats(); cout

When I run my code I get this error:

main.cpp: In function 'int main()': main.cpp:29:4: error: return-statement with no value, in function returning 'int' [-fpermissive] return;

7.22 Day 20: Swapping w/ Private Data Students This content is controlled by your instructor, and is not zyBooks content. Direct questions or concerns about this content to your instructor. If you have any technical issues with the zyLab submission system, use the "Trouble with lab?" button at the bottom of the lab. swapping Seats w/ Private Data Create public members to access private members. We'll do this activity in class

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!