View Single Post
Old May 22nd, 2006, 8:13 PM   #1
Mack1982
Programmer
 
Join Date: Dec 2004
Posts: 34
Rep Power: 0 Mack1982 is on a distinguished road
Pointer return type,.. ???

I am writing a class employ with the following private data members

fName. // An object of type char array used to hold the Employee's first name 
lName. // An object of type char array used to hold the Employee's last name 
address. // An object of type char array used to hold the Employee's address 
ssn. // An object of type char array used to hold the Employee's social security number 
hours. // An object of type double used to hold the Employee's hours worked 
payRate. // An object of type static  double used to hold the payRate 
empCount/ // an object of type static int that will count the number of Employee objects created

Now the problem is how do i use the following accessors to acesses the private memebers:
1.       char* getFName()   for the fName member

2.      char * getLName()

3.      char* getSsn()

4.      char* getAddress()

5.      double getHours()

6.       void display() :

The regular one i understand ,. the porblem are the ones with the pionter return type,..
The is bascially an abstract class and couple of classes would be dervied from it.
Thank u,..
Mack1982 is offline   Reply With Quote