Try something like this! Remember to #include
void Standard::get_list()
{
char filename[16];
char variable;
cout << "Please enter a filename: ";
cin >> filename;
fstream instream(filename);
if(instream.fail())
{
cout << "Input file opening failed.\n";
exit(1);
}
while (instream >> variable)
list1.push_back (variable);
cout << "\nThe contents of your file: \n" << endl;
for (i=list1.begin(); i != list1.end(); i++)
{
cout << *i << " " << endl;
}
}