c++ Program Please see where i do mistake, C/C++ Programming

Assignment Help:
#include
#include
#include
#include
#include


class Employee
{
private:
char *Name; //Set them as pointers...
int IdNumber;
char *Department;
char *Position;

public:

void setName(char Name);
void setDepartment(char Dept);
void setIdNumber(int ID);
void setPosition(char POS);
}
{
Employee::Employee()
{
Name=" ";
IdNumber=0;
Department=" ";
Position=" ";
}
void Employee::setName(const char* Name)
{
Name = Name;
}
void Employee::setIdNumber(int ID)
{
IdNumber = ID;
}
void Employee::setDepartment(const char* Dept) //WTF? why integer? Keep as character string!
{
Department = Dept;
}
void Employee::setPosition (const char* POS) //Same thing here!
{
Position = POS;
}
char Employee::getName() //const //What are these for?
{
return Name;
}
int Employee::getIdNumber() //const //What are these for? Plus, get your return types right!
{
return IdNumber;
}
char Employee::getDepartment() //const //What are these for? Plus, get your return types right!
{
return Department;
}
char Employee::getPosition() //const //What are these for? Plus, get your return types right!
{
return Position;
}
int main()
{
Employee SusanMeyer(), MarkJones(), JoyRogers();
SusanMeyer.setPosition("Vice President"); //etc.. for all the other guys...
}
getch();
};

Related Discussions:- c++ Program Please see where i do mistake

Create complex number using constructor , Create Complex number using const...

Create Complex number using constructor: class complex                                 {                                                   private:

How can one "reopen" std::cin & std::cout in binary mode?, A: It is impleme...

A: It is implementation dependent. Verify with your compiler's documentation. For instance, assume you wish to do binary I/O using std::cin & std::cout. Unluckily there is no st

StACK, Q. Explain that how do we implement two stacks in one array A[1..n] ...

Q. Explain that how do we implement two stacks in one array A[1..n] in such a way that neither the stack overflows unless the total number of elements in both stacks together is n.

Program to display asterisks in the shape of a plus sign, Write a program c...

Write a program called plus that will display asterisks in the shape of a plus sign which has the height and width specified by the user. You must only allow entry of an odd numb

Matlab to c conversion, i am a engineering student and am working on a proj...

i am a engineering student and am working on a project in audio processing and so i have designed a FIR filter in Matlab . how can i get my Matlab program converted to C program?

C program to check even & odd no, C Program to Check  EVEN & ODD NO   ...

C Program to Check  EVEN & ODD NO   main() {           int n, a;           clrscr();           printf("ENTER ANY NUMBER: ");           scanf("%d", &n);

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd