Can anyone teach me how to make a copy program in C to copy all kinds of files and stuff.
PS: Please add comments and guides in the code.
Printable View
Can anyone teach me how to make a copy program in C to copy all kinds of files and stuff.
PS: Please add comments and guides in the code.
What have you tried?
Nuthin really i just dont know how to start.
You might also have some luck by trying this.Code:#include <stdio.h>
#include <string.h>
int main(void)
{
// character array declarations
char str1[] = "all kinds of files and stuff.";
char str2[50];
// string copy function
strcpy(str2,str1);
printf("\n%s\n",str2);
return 0;
}
Judging by some of their previous threads, and the tone of "copying all kinds of files and stuff", methinks the OP would prefer a Write-A-Virus kind of program. Ironically, if he actually started learning some C the day he joined the forums, he probably wouldn't need to ask.
http://cboard.cprogramming.com/c-pro...t=#post1099006
http://cboard.cprogramming.com/c-pro...t=#post1071985
http://cboard.cprogramming.com/c-pro...t=#post1071782
http://cboard.cprogramming.com/c-pro...t=#post1071766