It's possible. The self-deletion part is a bit sketchy, though. You could kind-of do it (in most cases). At any rate, learn a bit more C++, and then you will easily figure this out, and won't need our help. No one here trusts a self-replicating program unless it has a really good reason for needing to self replicate, so your not gonna find anyone to help you.