The execution of the application gives me the error message. I have another source code that uses exactly the same code for opening a file and getting its content and it works. The difference is that the other one opens the file from the same directory as the executable and by using an OPENFILENAME dialog. I moved the file "settings.stg" inside the folder of the executable but the same ocurrs. What could the problem be?