![]() |
|
#1
|
|||
|
|||
Help needed reading a file into a BSTI am creating a program to sort fishing entries, entered from a text file, into a binary search tree. As you can see from the code im having some problems!!
Im new to this and any help would be greatly appreciated. Thanks HEADER FILE---------------------- CPP / C++ / C Code:
MAIN PROGRAM------------------------------- CPP / C++ / C Code:
Last edited by LuciWiz : 12-Apr-2005 at 07:41.
Reason: Please insert your C code between [c] & [/c] tags
|
|
#2
|
|||
|
|||
|
Thanks for the help on the tags.
|
|
#3
|
||||
|
||||
|
Quote:
Could you please tell us what error did you get, if any? Or what went wrong and why do you think that happened? It would make it easier on us to provide you with faster and better help. Best regards, Lucian __________________
Please read these Guidelines before posting on the forum "A person who never made a mistake never tried anything new." Einstein |
|
#4
|
|||
|
|||
|
Ive got a long long list of errors im trying to work through!
\im getting rid of a few of them slowly. An annoying one is: passing of arg 3 of 'fgets' from incompatible pointer type. Got that one on a number of lines when creating the binary tree. |
|
#5
|
||||
|
||||
|
Quote:
No problem, we'll take them one by one. You have a while statement outside of any function. That is illegal: CPP / C++ / C Code:
Also, what's up with all those semicolons after closing braces? There's no need for them. I suppose you got an error about needing a semicolon before while, but that was because it was outside of any function. You have a function implemented like this: CPP / C++ / C Code:
But what is root here? It's not defined in the current scope (or any, for that matter). Please try to solve these problems, and then we'll get to any others you may have. Kind regards, Lucian __________________
Please read these Guidelines before posting on the forum "A person who never made a mistake never tried anything new." Einstein |
Recent GIDBlog
US Elections and the ?Voter?s Responsibility? by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Airport Log program using 3D linked List : problem reading from file | batrsau | C Programming Language | 11 | 29-Feb-2008 08:44 |
| CD burner wont burn!! | robertli55 | Computer Hardware Forum | 1 | 18-Jun-2004 11:53 |
| Yet another CD burner problem: Lite-On LSC-24082K | Erwin | Computer Hardware Forum | 1 | 22-May-2004 12:28 |
| Re: Programming Techniques | WaltP | C Programming Language | 0 | 10-Mar-2004 00:56 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The