Question: #pragma once #include using namespace std; class Days { int day; public : int setday(string); int getDay( int ); string AddDays( int ); void PrintDay();

#pragma once

#include

using namespace std;

class Days

{

int day;

public:

int setday(string);

int getDay(int);

string AddDays(int);

void PrintDay();

string days[7] =

{

"Sun", "Mon", "Tues", "Wed", "Thurs", "Fri", "Sat"

};

};

#include "Days.hpp"

#include

using namespace std;

int getDay(int day)

{

cout << "What day of the week is it? " << endl <<

"0-Sun" << "1-Mon " << "2-Tues " << "3-Wed " << "4-Thurs " <<

"5-Friday " << "6-Sat ";

cin >> day;

if(day >= 0 || day <=6)

{

return day;

}

else

{

int setDay(int day);

}

}

int setDay(int day)

{

}

string addDay()

{

}

void PrintDay()

{

}

I want to take the current day that the user inputs and put it in the array (days[day]) so I can print the current day. How can I use the array in the class and in various functions?

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!