int main()
{
//do sth.
system("shutdown");
return 0;
}
In the linux system, after we write the program, we need to restart the system, using system("terminal command");
The terminal command can be replaced with other commands, such as the IP address.