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
This is a discussion on Drag and Drop files/Read and write files within the C Programming forums, part of the General Programming Boards category; Hello everyone, How to make a C program that reads a file when it is dragged over it? (.exe). I'd ...
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
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.