-
Drag and Drop files/Read and write files
Hello everyone,
How to make a C program that reads a file when it is dragged over it? (.exe).
I'd also like to know more about writing files with C (links possibly ? ;D).
Thanks in advance,
Scout
-
and the Hat of Guessing
When you drag a file over a program, the pathname to that file is passed to the program as if it were a command-line argument (so you can find it in argv[1]). So you can use that with fopen to open the file.
-
From the tutorials section on this site: Cprogramming.com - Tutorials - C File I/O.
Popular pages
Recent additions