| DoomCarnage (40) | |||||||||
Did i made a mistake again? Look bottom of my code for my specific question which is bolded in the comments Thanks...
"EMPLOYEE.DAT" MAN4E23 A34889Tan Beng Soo 7783456S Z23669Tan Chee Y ong 5668877S D2356 Shiva Kumar 3744552H | |||||||||
|
Last edited on
|
|||||||||
| DoomCarnage (40) | |
| Bumpz Anyone? | |
|
|
|
| firedraco (4980) | |
| Get_EmployeeID() doesn't print anything. | |
|
|
|
| DoomCarnage (40) | |
| Can u elaborate? I thought i have the function to return the employee ID? | |
|
|
|
| Albatross (3448) | |
|
Get_EmployeeID() doesn't print anything. It returns the employee ID, but nothing is done with it. Nothing. It's just discarded because it's not read into anything: not cout, not an ofstream, it's just discarded. You may want a variable to store the data in so that you may do something with it later. -Albatross | |
|
|
|
| DoomCarnage (40) | |||
|
I don't get quite what you are saying you are saying that the value of EmployeeID is being discarded after it comes out of the function. Thus Staff[count]->Get_EmployeeID() has no value. If so should i store the value as
| |||
|
Last edited on
|
|||
| Albatross (3448) | |
|
Oh, it has a value, but it is discarded. Those are two different things. Your general idea for storing it is right, though. Why not use strings? -Albatross | |
|
|
|
| Kangaroux (34) | |
Staff[count]->Get_EmployeeID()What Albatross is saying is that you're calling the function but not assigning it to anything. | |
|
|
|
| DoomCarnage (40) | |
| Okay thanks people :) | |
|
|
|