|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#1 |
|
Member (6 bit)
Join Date: Mar 2002
Posts: 32
|
getting this example to compile
I'm using the Turbo C 2.01 compiler for this example that I copied out of the book "Hands - on Turbo C" by Larry Joel Goldstein and Larry Gritz. It appears the example has a mistake in it and I need help solving it.
Code:
#include |
|
|
|
|
|
#2 |
|
Registered User
Join Date: Dec 2000
Location: where justice defined.
Posts: 174
|
where is the PhoneNum method?? did you included it??
Last edited by c-learner; 04-08-2002 at 12:10 PM. |
|
|
|
|
|
#3 |
|
Member (12 bit)
Join Date: Mar 1999
Location: MN or WI
Posts: 3,017
|
What does the compiler complain about (what's the error?)
__________________
Paul M. Victorey ------------------ I am not responsible for any problems that may arise as a result of following my advice. This includes, but is not limited to, computer failure, loss of data, nuclear war, famine, boils, no clean laundry, your daughter running off with a biker gang, or armageddon. Take my advice at your own risk. |
|
|
|
|
|
#4 |
|
Member (6 bit)
Join Date: Mar 2002
Posts: 32
|
The compiler says:
If missing ( in function main misplaced else in function main My problem is with this line: if Entry.Name = SearchName then How do you translate that to C? The overall purpose of the program is to search through a file for a person's name and output their phone number. |
|
|
|
|
|
#5 |
|
Member (12 bit)
Join Date: Mar 1999
Location: MN or WI
Posts: 3,017
|
The if line looks correct. You do need brackets around your while loop, though, that might be the problem.
If that doesn't work, I'll try compiling this myself later today, but I've got a paper to write first. |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|