How to create a text file on a folder

I already know how to make a text file. I just want to know how to make a text file on a different directory and not the save directory as the application itself. For example, I want to make a program that creates the text file on c:/
How would i do that?
closed account (3TXyhbRD)
By specifying the full path in your file creation function. By default the path you specify is relative to the folder from where you launch your executable.

E.g.: having "filename" as parameter will create a file named "filename" in the same directory you launch an application. Having a name like "../filename" will create a file named "filename" in the parent directory.

Finally, if you use "C:/filename" will create a file in C: named filename.
Topic archived. No new replies allowed.