Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Records being annoying
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Tallguy




PostPosted: Thu Apr 30, 2009 7:57 am   Post subject: Records being annoying

So i'm doing a records assignment. I store the data within a sequntial file into an array. the user choose the data to be shown, then it is outputted. but it works fine sometimes and not other times.

i can search the name without problem it's just the tv show that doesn't work although "the simpsons" work

Anyone have suggestions?


This is my assingment

Quote:

4. Copy and Modify the program "cartoon.t" below. Currently there are five fields: the
name of the character, the network on which the cartoon is shown, the rating, the name of
the cartooon show and the year the cartoon came into existence. Add the search feature to
the program. Using either the name of the cartoon character or the nane of the show the
character appears, do a search for the particular data. If no match is found, communicate
this to the user. Save as lastname_firstname record#4.t.



New Folder.zip
 Description:

Download
 Filename:  New Folder.zip
 Filesize:  1.08 KB
 Downloaded:  89 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
corriep




PostPosted: Thu Apr 30, 2009 2:36 pm   Post subject: RE:Records being annoying

How would you approach this with strings instead of records? Its basically the same thing.

Also, why are you using a forward and body procedure when you only need a normal procedure.
Tallguy




PostPosted: Thu Apr 30, 2009 4:51 pm   Post subject: RE:Records being annoying

i'm doing it exactly the way i would with strings, it just doesn't work for "the jetsons" and "the flintstones", everything else works fine.i have no idea why its being gay

body proc because it goes back to main, and because i like them

anyone can help me?
zero-impact




PostPosted: Thu Apr 30, 2009 5:39 pm   Post subject: RE:Records being annoying

The problem is your input file. You have a bunch of trailing spaces after some of the names which turing is reading as part of the name.
Just go into your text file and delete those spaces and you should be fine Very Happy
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 4 Posts ]
Jump to:   


Style:  
Search: