-
Enumerations
Okay I am just learning C++ and I have to make a program that useses enumerations and two switch statements.
You have the user enter and empoyee title like (accountant, secretary, etc..) But they can only enter the first letter of the title (a, s) and then it will display the full title of the person. And it says to use two switch statements.
How do I do this?
-
What is your problem? Have you even tried on your own? Do you expect us to write the entire program for you?
How you do it?
1) Sit down and think. What have you learned at your lessons? Could there be a connection between the last lession and this assignment?
2) Do you know how to enumerate/switch? If not, you probably didn't pay attention at your class or didn't do your homework.
If you did that and still doesn't understand, then you could ask here on how to do it.
We gladly (?) help people if they have problems with something specific, not writing whole programs. You have to show to us that you have at least tried to do it...
If you want help, please try to make a more accurate question.
...
I don't even know why I took the time writing this...
<edit>
just to speed you on the way:
http://www.cprogramming.com/tutorial/lesson5.html
</edit>
-
Hmm, I must've been really tired and irritated last night. Here's a little help:
Code:
char* GetFullName(char Letter)
{
switch(Letter)
{
case 'S':
case 's':
return "Secretary";
case 'A':
case 'a':
return "Accountant";
default:
return NULL;
}
}
-
Thank you. Everyone gets irritated once in a while so thnx for your help with that. That was all that I needed.
Thanx for your time.