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

Username:   Password: 
 RegisterRegister   
 File I/O issues...
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Insectoid




PostPosted: Fri Jul 04, 2008 10:24 pm   Post subject: File I/O issues...

So, I'm making a database program. To accomodate the varying number of entries, I have decided to input the number of entries from the database TXT file, to use as the upper bounds in arrays/for loops. I got an error saying this:

Turing Error wrote:

Get attempted on incompatible stream number 1


What does this mean?

Here is the offending code:

code:

var num_entries : int
open : database, "Database.txt", put
get : database, num_entries


Help?
Sponsor
Sponsor
Sponsor
sponsor
gitoxa




PostPosted: Fri Jul 04, 2008 10:28 pm   Post subject: RE:File I/O issues...

You opened the stream with the ability to 'put' to it. You're trying to 'get' from it.
Insectoid




PostPosted: Fri Jul 04, 2008 10:44 pm   Post subject: RE:File I/O issues...

D'oh! lol, I even checked that...so stupid...
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  [ 3 Posts ]
Jump to:   


Style:  
Search: