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 help with it.
This is my code:
#include
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 classStep 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