Try creating a file instead and make sure that the file is indeed in the proper directory. Especially in cases where you are using an IDE, it can be hard to figure out what the actual working directory is.
Especially in cases where you are using an IDE, it can be hard to figure out what the actual working directory is.
Try coding the full path to the file. If that works that would be a pretty good indication that the program executable is not in the same directory as simple.dat.
If you are using Visual Studio on Windows you will need to escape the backslash character in the path, i.e., "C:\\ProgramDirectory\\simle.dat" not "C:\ProgramDirectory\simle.dat" or just use a forward slash "C:/ProgramDirectory/simle.dat"
Generally in Visual Studio under the project directory you will find both a Release and a Debug directory which is where the executables reside.