How to open any file? (Just to open and not to read, what would the user select to open it)
I need to open a txt file which is NOT in the same folder as the project. Can you write in detail how to do this?
How to open any file? (Just to open and not to read, what would the user select to open it)
I need to open a txt file which is NOT in the same folder as the project. Can you write in detail how to do this?
Try to write more detailed questions. To get an answer, explain what exactly you see the problem, how to reproduce it, what you want to get as a result, etc. Give an example that clearly demonstrates the problem. If the question can be reformulated according to the rules set out in the certificate , edit it .
To open a txt file that is NOT in the same folder as the project, you must specify the full path to this file in the file name. Or there is a second option - to change the current directory and open the file without the full path, but after that it is strongly recommended to return the current directory back. :-)
UPD1:
And yet - the full path can be specified either absolute, or relative to the current directory. :-)
ShellExecute(0, 0, "notepad.exe", полный_путь_и_имя, 0, SW_SHOW); Source: https://ru.stackoverflow.com/questions/744228/
All Articles
system(файл)can? - Vladimir Gamalyan