Physically opening a File in C++

Just a small question really as all I can find is opening a stream to edit within the code, rather then actually open a file on windows. Basically, my program has made changes to a file, and I would now like the user to be able to reply Yes or No to a question, so that the file physically opens on the PC.

Regards.
On Windows, there's the ShellExecute function

http://msdn.microsoft.com/en-us/library/bb762153(v=vs.85).aspx
What must I #include <> for this to work?
#include <windows.h>

Also, be sure to initialize COM like the article says.
1
2
 string dir = "C:\\Users\\Damien\\Documents\\NetBeansProjects\\WordListGenerator";
    ShellExecute(NULL, "open", (dir + "\\output.txt").c_str(), dir.c_str(), SW_SHOWNORMAL)


I still cant get this working, can anyone kindly pass on some code snippets?
ShellExecute(NULL, "open", (dir + "\\output.txt").c_str(), NULL, dir.c_str(), SW_SHOWNORMAL);

Notice the other NULL parameter before dir.c_str()
Topic archived. No new replies allowed.