Christmas Prank

I'm trying to make a christmas prank program (fake virus); and this is how it works:

1) Opens up itself in another command window
2) Runs a bunch of complicated math in a while loop

That's all it does, and since it keeps on opening itself the computer will eventually lag.

I've only had a few courses in C++, so I could only program so few.
I heard that "system()" can open new programs, but when I tried it, it only opened in one command window.
How do you make it so that it opens up another window, and still run?

Here's what I have:
#include <iostream>
using namespace std;
int main()
{
    float x = 1;
    system("Component.exe");
    while(x>0){
               MATH HERE
               }
}


Component.exe is the name of this program.
Last edited on
You don't need to write a program to do that.
(cmd.exe)
:loop
start script.bat
goto :loop


Only an experienced user can stop it.
....I'll put that in the source code. Thanks!
...I'm assuming it'll work if I compile it with the other necessities.
Uh... That's a command line script. There's nothing to compile.
Topic archived. No new replies allowed.