^ What L B said.
But let me try to point you in the correct direction here.
First of all, you can't use private variables outside a class out. This is what's causing an error when you attempting to call mon, tue, wed, thur, fri, sat, sun in your main function. You will need to declare strings in your main function to be passed into the "setDay" and "getDay" functions.
Additionally, your setDay and getDay functions don't actually do anything. The parameters state that they take a string but no variable follows and it isn't actually set to the private variables in the class. You'll need to do something like the following:
1 2 3 4 5
|
void setDay(string m, string t,ect..){
mon=m;
tue=t;
..
}
|
However, I think your setDay is only meant to have 1 parameter as mutator functions are typically meant to set 1 thing at a time in order for the get function to make sense (get functions can only return 1 value at a time).
So, unless the assignment specifically says so I would highly suggest doing the following:
1 2 3
|
void setDay(string d){
day = d;
}
|
Then, of course, you would have to make a private variable called "day".
Your getDay function should not be a void either. It is meant to have a return type and it just returns the private variable in the class. Example:
1 2 3
|
string getDay(){
return day;
}
|
So you can enter any day of the week in the parameter of your setDay function like
today.setDay("Monday")
and then run the get function to display it. So,
cout<<today.getDay()
.
If you call setDay again you can change the value of "day" and use the get function to display the new value.
For more information on classes, I would suggest the following link:
http://www.cplusplus.com/doc/tutorial/classes/