Question: Lets say I have a employee class, which has a member function void updateSalary(double x); private variable salary; and I want to update the salary.
Lets say I have a employee class, which has a member function void updateSalary(double x); private variable salary; and I want to update the salary.
void employee::update (double x){
salary = x;
x++;
}
Now, my question is, is that a valid or invalid way to do it?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
