Trouble with opening and reading file with C++ language


I’m currently trying to read in a text file that’s in the same folder as the .cpp file but all I get is a blank cmd. I’m using the fstream header.


Does it work when you try compiling your code from the command line or in another editor? If not, then this question is not Atom-related and you should look for help on a site like Stack Overflow or another C+±related forum. They will want to see your code.

If the error only happens in Atom, then we will need to know what package you’re using and how you’re configuring it.