#include <windows.h> int main() { ShellExecute (NULL, "open", "C:WINDOWSsystem32cmd.exe", "/c "shutdown -P"", NULL, SW_SHOW ); }