![]() |
|
#1
|
||||
|
||||
Function Overiding?the code below has some type of mistake that my mind is not working on and the mistake that im getting is that when i cin the data into the human class and wants the data to be entered in student class too it actually first cin the data into the human class and after coutting the result of the human class it offers to enter the data into student class which i want the data to be eneterd at once aand i get the console out at once......please correct my program
my code is as follows: CPP / C++ / C Code:
sorry for mistakes done i hurry....Regards |
||||
|
#2
|
|||
|
|||
Re: Function Over Ridding ...?Quote:
In the code presented, you should be calling the ReadData() member function within the Human class's constructor, & Read() member function within the Student class's constructor. By doing this, you will be able to significantly reduce the number of member functions called in main(). |
Recent GIDBlog
Problems with the Navy (Officers) by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| run script command on ns2.26 | newbie06 | Computer Software Forum - Linux | 66 | 16-Jan-2010 10:53 |
| Airport Log program using 3D linked List : problem reading from file | batrsau | C Programming Language | 11 | 29-Feb-2008 07:44 |
| Need Help with input files. | Efferus | C++ Forum | 2 | 24-Nov-2007 16:19 |
| [Include] Doubly-linked List | dsmith | C Programming Language | 6 | 14-Apr-2006 13:12 |
| [Tutorial] Function Pointers | aaroncohn | C++ Forum | 4 | 17-Feb-2006 11:33 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The