"And that's why he shot his computer"

Okay... I'm going crazy here...

Here is my code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Salaried::Salaried(double _weeklySalary, int _num, string _name, string _address, string _phNum, string _ssn)
	:Employee(_num, _name, _address, _phNum, _ssn)
{
	weeklySalary = _weeklySalary;
}
	
double calcSalary()
{
	double salaryTotal;
	double federal = .20;
	double state = .075;
	double benefits = .0524;
	
	weeklySalary = weeklySalary - ((weeklySalary*federal) + (weeklySalary*state) + (weeklySalary*benefits));  //It says undefined on this line!
	return weeklySalary;  
}


Someone tell me why my compiler is saying that weeklySalary is undefined... It's properly declared in my header file and if I comment out everything in my calcSalary function, the program executes flawlessly...

Please help!
Last edited on
double calcSalary() should be double Salaried::calcSalary() if it's part of that class.
Oh... Wow... I should make fun of myself for that one... Thanks!
no worries :)
Topic archived. No new replies allowed.