View Single Post
  #2 (permalink)  
Old 12-13-2006, 10:04 AM
Void's Avatar   
Void Void is offline
Programming Expert
 
Join Date: Jun 2006
Posts: 410
Rep Power: 11
Void is on a distinguished road
Default

Without looking to in depth into you program it looks like your program will try to read forever if no -1 is found. I suggest that you read all of the input into one string and then split the string by a -1. This would keep you from needing an ending -1.
__________________
Void
Reply With Quote