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.
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?
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
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.
Help please
Help again!
Help
Malicious Programs
- Compiler warnings are like "Bridge Out Ahead" warnings. DON'T just ignore them.
- A compiler error is something SO stupid that the compiler genuinely can't carry on with its job. A compiler warning is the compiler saying "Well, that's bloody stupid but if you WANT to ignore me..." and carrying on.
- The best debugging tool in the world is a bunch of printf()'s for everything important around the bits you think might be wrong.