how to shut down windows in c++

#include <windows.h>

int main() {
    ExitWindowsEx(EWX_SHUTDOWN, 0);
    return 0;
}