View Single Post
  #2 (permalink)  
Old August 30th, 2010, 08:32 PM
Coder1 Coder1 is offline
Registered User
 
Join Date: Jun 2010
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Lightbulb

Read numbers from a text can look more like this:
Code:
inputFile.open("c:\\x\\numbers.txt");
You should also put a check for file error so the program can tell you if it has successfully accessed the text file.
A better example read in numbers from a file C++ full source code for reading numbers from a text file.
Reply With Quote