| 1 | #include <stdio.h> |
| 2 | #include <stdlib.h> |
| 3 | |
| 4 | int main(int argc, char** argv) { |
| 5 | char* fnamesrc = (char*)argv[1], fnamedest = (char*)argv[2]; |
| 6 | FILE* fpsrc, fpdest; |
| 7 | |
| 8 | if (argc < 3) { |
| 9 | puts("Please enter two arguments separated by a space: file_name_src file_name_dest"); |
| 10 | exit(EXIT_FAILURE); |
| 11 | } |
| 12 | |
| 13 | fpsrc = fopen(fnamesrc, "r"); /* read mode */ |
| 14 | if (fpsrc == NULL) { |
| 15 | perror("Error while opening the source file.\n"); |
| 16 | exit(EXIT_FAILURE); |
| 17 | } |
| 18 | |
| 19 | fclose(fpsrc); |
| 20 | |
| 21 | return EXIT_SUCCESS; |
| 22 | } |