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

Username:   Password: 
 RegisterRegister   
 File reading - getting the WHOLE line
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh pageAdd this topic to your bookmarks (CTRL-D) View next topic
Author Message
smool




PostPosted: Fri Sep 16, 2011 8:37 am   Post subject: File reading - getting the WHOLE line

What is it you are trying to achieve?
So im trying to read a text file which has all the worlds countrys names, and then on the next line their capital. So in my code i get the name, then i get the capital. the problem is some countries names or capitals are two names, in which case the name of the country becomes the first part of their name, and then the capital becomes the second part of the countrys name, and then everything else is messed up from there.
so my question is, how do i get the WHOLE line into my string variable from a file?
 
Sponsor
Sponsor
Sponsor
sponsor
DemonWasp




PostPosted: Fri Sep 16, 2011 9:20 am   Post subject: RE:File reading - getting the WHOLE line

get : stream, variable : *

You can find this in the Turing help for the "get" command.
 
Raknarg




PostPosted: Fri Sep 16, 2011 5:11 pm   Post subject: RE:File reading - getting the WHOLE line

Haha, you were sooo close Razz
 
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh pageAdd this topic to your bookmarks (CTRL-D) View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: