I have a simple Simulation program that you can save your status but if a user moves the folder from its origanal location the saves wont follow. Is there a way to set it so the saves always save where the program is even if its moved?
I have a simple Simulation program that you can save your status but if a user moves the folder from its origanal location the saves wont follow. Is there a way to set it so the saves always save where the program is even if its moved?
I didnīt understand well your question, I think... Anyway, if you open a file to append information in it, or open to write in it, the default is to create the file if it does no exists. And this operation is made in the same directory as the program.
Nothing more to tell about me...
Happy day =)
Im using Dev-C++ and when ever i open a file to write into or read from it creates it the Dev-C++ folder, I want the file to alwasy be in the folder of teh program even if i move it.
You can use the GetModuleFileName() API routine to return the full path to the module you are currently running, simply pass a NULL as the first parameter. Strip the module name off the end and there is the directory you want.
Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.
My Dev does not do this... :\Originally Posted by mill1k
version 4.9.8.0
Nothing more to tell about me...
Happy day =)
Ahhh I was using the older version