Help with reading from a file.
I need to prompt the user for a filename and then open and read from that file. Also I need to be able to take the contents of the file I'm reading from and store them in a vector or stack.
This is the code that I have so far but I don't know if this is the most efficient way to do it or why it doesn't seem to be working.
The file to be opened is a simple text file containing a series of integers in this fashion.
cout<<"What is the name of the maze input file?"<<endl;
int i = 0;
while(file_name[i]!=0) //I convert the string into an array of chars because
//the open function only accepts char arrays as a
From here I can't figure out how to actually pull information out of the file efficiently.
Thank you for any help.