I don't do any idea how to do it!! If someone could explain how the FORK() works, how to use it make it divide a process like that code, I'll thank forever!! =P
1. fork() only works on unix-like systems, make sure you're not on Windows.
2. Try googling "unix fork example C++" or something, I guarantee you will get an example.