How exactly would I go about running a file via double-clicking it, then having my console executable open it and read it's contents? My problem isn't in the reading from the file, it's how to read the file that's associated with the executable by the user. For example, "*.ocmd" files are associated with the exectuable. I'm on Windows 7 x64.
Would I pass it on like a regular argument session?:
Use "Open with" command and select your executable. Your program should get filename as argument 1.
Or you can dig the registry for existing examples of file handling to do something more complex.
This: http://msdn.microsoft.com/en-us/library/cc144171.aspx#dynamic_behavior might help ypu
Okay. And since my program gets argument 1 as the executable name, I need to take argument 2 as the filename. Then I ifstream the file with the argument 2 and do what I need to do. Thanks.