C++ Console application using classes

Hi I am new at this and wrote this code but for some reason it does not come up with the correct answers need help please! Here is my code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
#include <iostream>
#include <string>

using namespace std;


class COTP
	{
	public:
		string m_name;
		double m_hours;
		double m_othours;
		double m_otwage;
		double m_otpay;
		double m_wage;
		double m_basepay;
		double m_pay;

		double calculateOTpay 
			(double hours, double othours, double otwage, double otpay, double wage, double pay)
		{
			m_othours = hours - 40;
			m_otwage = wage * 1.5;
			m_basepay = hours * 40;
			m_otpay = otpay * otwage;
			m_pay = otpay + m_basepay;

		return m_pay, m_othours, m_otwage ;
		}
	};


	
int main (void)
{	
	char* m_name [3] =
	{
		"Mike",
		"Mandy",
		"Wesley"
	};
	
	COTP Employee0;
	COTP Employee1;
	COTP Employee2;

	double m_pay = '.\0';
	double m_othours = '.\0';
	double m_otwage = '.\0';

	Employee0 .m_name = m_name[0];
	Employee0 .m_hours = 54.00;
	Employee0 .m_othours = m_othours;
	Employee0 .m_wage = 25.00;
	Employee0 .m_otwage = m_otwage;
	Employee0 .m_pay = m_pay;

	Employee1 .m_name = m_name[1];
	Employee1 .m_hours = 50.00;
	Employee0 .m_othours = m_othours;
	Employee1 .m_wage = 20.00;
	Employee0 .m_otwage = m_otwage;
	Employee0 .m_pay = m_pay;


	Employee2 .m_name = m_name[2];
	Employee2 .m_hours = 45.00;
	Employee0 .m_othours = m_othours;
	Employee2 .m_wage = 15.00;
	Employee0 .m_otwage = m_otwage;
	Employee0 .m_pay = m_pay;


	cout << endl << endl;
		cout << "\nThis program will show the pay and overtime pay for three employees\n\n";
	cout << endl;

	cout << endl << endl;
		cout << "\nThe overtime information for " << Employee0 .m_name << ".\n";
		cout << "\nTotal hours= " << Employee0 .m_hours << ".\n";
		cout << "\nOvertime hours= " << Employee0 .m_othours << ".\n";
		cout << "\nHourly wage= " << Employee0 .m_wage << ".\n";
		cout << "\nOvertime wage= " << Employee0 .m_otwage << ".\n";
		cout << "\nTotal Pay =" << Employee0 .m_pay << ".\n";
		cout << endl;

	cout << endl << endl;
		cout << "\nThe overtime information for " << Employee1 .m_name << ".\n";
		cout << "\nTotal hours= " << Employee1 .m_hours << ".\n";
		cout << "\nOvertime hours= " << Employee1 .m_othours << ".\n";
		cout << "\nHourly wage= " << Employee1 .m_wage << ".\n";
		cout << "\nOvertime wage= " << Employee1 .m_otwage << ".\n";
		cout << "\nTotal Pay =" << Employee1 .m_pay << ".\n";
		cout << endl;

	cout << endl << endl;
		cout << "\nThe overtime information for " << Employee2 .m_name << ".\n";
		cout << "\nTotal hours= " << Employee2 .m_hours << ".\n";
		cout << "\nOvertime hours= " << Employee2 .m_othours << ".\n";
		cout << "\nHourly wage= " << Employee2 .m_wage << ".\n";
		cout << "\nOvertime wage= " << Employee2 .m_otwage << ".\n";
		cout << "\nTotal Pay =" << Employee2 .m_pay << ".\n";
		cout << endl;
	

	return 0;

}


Any help is much appreciated.
You never initialize m_othours, m_otwage and m_pay for Employee1 and Employee2. You just keep reassigning Employee0's members.
Now that iilook like an idiot I fixed that, it gives me the output of:



This program will show the pay and overtime pay for three employees





The overtime information for Mike.

Total hours= 54.

Overtime hours= 11776.

Hourly wage= 25.

Overtime wage= 11776.

Total Pay =11776.




The overtime information for Mandy.

Total hours= 50.

Overtime hours= 11776.

Hourly wage= 20.

Overtime wage= 11776.

Total Pay =11776.




The overtime information for Wesley.

Total hours= 45.

Overtime hours= 11776.

Hourly wage= 15.

Overtime wage= 11776.

Total Pay =11776.

Press any key to continue . . .
double m_pay = '.\0';

What is this?
I really appreciate your help sorry looking dumb I thought that was the sign for "NULL". I originally had 0 but all those values would show 0 instead 11776
In C++, NULL is just a macro for 0. The character '\0' is also 0.

I originally had 0 but all those values would show 0

What did you expect them to show?

PS: don't worry about "looking dumb", just focus on learning what you want to learn.
It should do the calculations in function like for Employee0 it should show
Total hours= 54.00
Overtime Hours= 14.00
Hourly wage= 25.00
Overtime Wage = 37.50
Overtime wage= 525.00
Total pay= 1525.00
You'll need to call that function if you want it to be executed.
This is how I have done it now:
1
2
3
double COTP::m_pay = 0;
double COTP::m_othours = 0;
double COTP::m_otwage = 0;

And I end up with this error:

1>h:\overimepaystructure\overimepaystructure\overtimepay.cpp(62) : error C2761: 'double COTP::m_pay' : member function redeclaration not allowed
Topic archived. No new replies allowed.