With system(something) under windows basically does the same thing as if you had opened a CMD shell and entered your commands there, with Win32 you can call windows API functions directly - how much of a difference that makes in Windows I am not sure, "shutdown" could be the name of a program, but it could also be a command. Either way, windows gives precedence to local files so if you call "shutdown" and you have a file called "shutdown" or "shutdown.exe" in your working directory, windows will attempt to execute that.