This displays whats in the text file but how can i make it store what it displays in test. I did test=infile.get() but it doesnt work.
I had it working with something I did but I didn't save and I don't remember how I did it...err very aggervating....its drivin me crazy
Code:
cout<<"Enter The Input File(C:/example.txt): ";gets(input_file);fflush(stdin);
ifstream infile;
infile.open (input_file, ifstream::in);
while (infile.good())
cout<<(char) infile.get();
test=infile.get();
cout<<test<<endl;
infile.close();