Try one of the following:

1) use ifstream instead of fstream

2) add ios::in to the open mode