how can you make a file copy itself?
how can you make a file copy itself?
u mean an exe-file?
The OS requirements were Windows Vista Ultimate or better, so we used Linux.
Or like a virus - who knows.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
a TXT file but it would be handly if i knew how to copy a .exe file
You mean like from the command prompt
copy c:\from\here.txt c:\to\there.txt
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
no i want a program to automatically copy itself a certain amount of times when ran is there anyway to do that?
I can think of no good reason why you'd want to do that. The solution, however, is simple if you think about it.
The word rap as it applies to music is the result of a peculiar phonological rule which has stripped the word of its initial voiceless velar stop.
well vould you give me a little hint im new to C++
If you're new to C++, this shouldn't be a first project. Try learning the language before you do stupid things like this. The last thing we need are more poorly written viruses...er..self-replicating programs.
Quzah.
Hope is the first step on the road to disappointment.
no its not for a virus is anyone going to help me?
Nope
Woop?
> no i want a program to automatically copy itself a certain amount of times when ran
Sure sounds like it to me.
What could be the benefit of that, apart from filling up your disk with copies ?
> a TXT file but it would be handly if i knew how to copy a .exe file
A TXT file does not execute (unless M$ really screws up and makes them executable the same way they've gone with JPG files).
> no its not for a virus is anyone going to help me?
Not me.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
Give us a good reason why a program would need to make copies of itself, and maybe someone will help you then.
well im trying to make a program that will make a copy of itself before destroying itself
It's not reliably possible in pure standard C++.
All the buzzt!
CornedBee
"There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
- Flon's Law