![]() |
|
#1
|
|||
|
|||
TreesHello everybody. I have made a simple program of ceation binary search tree. The program is not displaying all the contents of the tree, just displaying the root node. I am not able to fix where the problem actually lies.
CPP / C++ / C Code:
|
|||
|
#2
|
|||
|
|||
Re: TreesThe scanf function is leaving a '\n' character behind in the buffer, which is being retrieved by the second call to scanf. So when you test for choice == 'y' it fails (because choice == '\n').
Instead of scanf( "%c", &choice ); try choice = getch(); |
|
#3
|
||||
|
||||
Re: TreesQuote:
__________________
The 3 Laws of the Procrastination Society: 1) Never do today that which can be put off until tomorrow 2) Tomorrow never comes |
Recent GIDBlog
Problems with the Navy (Enlisted) by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Binary Trees Problem | emC++ | C++ Forum | 3 | 13-Aug-2006 08:33 |
| Question about Binary trees | mia | C++ Forum | 0 | 25-May-2006 11:10 |
| Trees and Keys (not for the faint-hearted!) | greymalkin | C++ Forum | 11 | 08-Nov-2005 08:04 |
| Search Binary Trees and I/O files | Krandygrl00 | C++ Forum | 1 | 20-Jul-2005 08:11 |
| folder problem in trees | zuzupus | MySQL / PHP Forum | 23 | 26-Sep-2003 07:32 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The