I'm wondering how I can open a file literally in C++ (like double clicking it)?
C++ – how to open a file (ie. .txt file) in C++ (kinda like double clicking it in windows)
c++fileiowindows
c++fileiowindows
I'm wondering how I can open a file literally in C++ (like double clicking it)?
Best Solution
Provided you have the ".txt" extension registered (and text files should be associated with Notepad in a default installation, or something else if you've changed it from Explorer - you'd have to work pretty hard to disassociate them), Windows will open it for you without you having to specify the executable name:
or, for a web page in your browser of choice: