Try something like this to read the file (don't use
s like you're doing and you won't have to worry about buffer overflows and such).
using namespace std;
cerr << "Error opening file!" << endl;
while (getline(ifs, line))
cout << line << endl;