Quote Originally Posted by samwillc View Post
Controlling the computer with C++ - C++ Forum

Could try this? A quick google search found that one.
Best pay no heed to that link.
system is bad for many reasons, among them nonportable and a security risk.
Furthermore, there are other bad practices there, such as gets.

Rebooting a computer is not done in a single line and depends on your OS.