Please how i shutdown my pc with langage c

Fermé
kaba - 16 mai 2004 à 14:17
blurk Messages postés 486 Date d'inscription vendredi 16 avril 2004 Statut Membre Dernière intervention 15 mars 2009 - 17 mai 2004 à 12:19
think's for read
how can i shutdown and restart my computer in #c language(under linux)
think's for answer.
A voir également:

2 réponses

c# I dont know, but C/C++, add this command :
system("shutdown now -r");

Moreover, this is a FRENCH forum here, and only FRENCH language is spoken!!!
0
blurk Messages postés 486 Date d'inscription vendredi 16 avril 2004 Statut Membre Dernière intervention 15 mars 2009 160
17 mai 2004 à 12:19
excuse me kaba-fr, but the "-r" option will restart the computer !
you can use "-h" witch is the default set as the mean of halt
(the rest is right)

have a nice day! :-)
0