how do you open a file with the complete location, rather then the name of the file, and have it in the folder as the program?
I have this code, to drag a file onto it, but I get errors, what is wrong with it?
In Win32 API use GetModuleFileName to get your program's location and name. Remove the .exe name at the end and you have the program's location. Add to the location the filename you want to write then open the file for writing.
The parameters that are needed by the ifstream constructor is a c-style string. You can use the c_str() method of the string class to convert to a c-style string, or you could just define a c-style string variable at the beginning of your code so you don't have to do a conversion: