Number check in an eof, adding the numbers, and check digit in?

I have written the file and store it to my computer. However, this is not the issue. The issue is the numbers are not showing up to what I need. I need the tens hundreds, thousands, etc to show up and either show a 1 or 0 for the check digit. Any information given is appreciated. My code is down below.

#include <iostream>
#include <fstream>

using namespace std;

int main()
{
int i, number, maxRows, remaining, Check_num,r,h,t,o,newnumber, temp[5];

ifstream input;

// tells user where the file is located.
//Must be very specific in order to access
input.open("C:\\Lab_1C.txt");

i = 0;

//EOF (end of file) enables user to read the file from where ever it my be stored

while(!input.eof())
{
input >> number;

}

maxRows = i;

cout << "Numbers to be used: " << endl;

for(i = 0; i < maxRows; i++)
{
cout << number<< endl;
}

//numbers
t=number/1000;
r=number%1000;

h=r/100;
r=r%100;

t=r/10;
o=r%10;

if ((t+h+t+o)%2==0){
newnumber=number*10;
}else{
newnumber*10+1;

}

cout<<endl<<endl;

system ("pause");
return 0;
}
end of file is bool function that returns true if the file pointer is at the end of the file. and when you are doing input >> number. number will = the last number in the file. and you will just output that number i times.(i is always = to 0). also remove the system pause please(read the second beginner forum post for more information).
Topic archived. No new replies allowed.