Hi, i have a question on my code im doing. Im trying to make a math program that lets the user input how many numbers he/she would like to use to Add, Subtract, etc..... I am currently using the <fstream.h> header file and i am opening a txt file called variables. Then it figures through the loop how many numbers the user wants like (Ex. if the user inputs 5 then the loop wil count all the way to 5 like this. 1,2,3,4,5 and add spaces between them.) But now i want to know how to read these numbers from the text file and create that many variables or like this (Ex. reads 1,2,3,4,5 and creates int 1, int 2, int 3, int 4, int5; ).
I would like to know how to do that though. but im pretty sure you can use arrays and if they are esier to use then tell me how, otherwise tell me how to do that with the variables file. Heres my code so far......

***************************

#include <iostream.h>
#include <stdio.h>
#include <fstream.h>

void main()

{
int Amt;
int i=0;
char str[50];

{
cout<<"Welcome to the math program.\n";
cout<<"How may numbers do you want to use?";
cin>>Amt;

}
ofstream a_file("variables.txt");

while(i<Amt)

{
i++;
a_file<<i<<" ";
}

a_file.close();

}

*****************************

Any help would be great,
Thanks,
Joe