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.