Petit programme
Fermé
boby
-
25 juil. 2006 à 17:00
mamiemando Messages postés 32797 Date d'inscription jeudi 12 mai 2005 Statut Modérateur Dernière intervention 6 décembre 2023 - 26 juil. 2006 à 13:52
mamiemando Messages postés 32797 Date d'inscription jeudi 12 mai 2005 Statut Modérateur Dernière intervention 6 décembre 2023 - 26 juil. 2006 à 13:52
A voir également:
- Petit programme
- Programme demarrage windows 10 - Guide
- Programme démarrage windows 10 - Guide
- Programme (x86) ✓ - Forum Windows
- Lg non programmé ✓ - Forum TV & Vidéo
- Petit colis distribution ✓ - Forum Consommation & Internet
1 réponse
mamiemando
Messages postés
32797
Date d'inscription
jeudi 12 mai 2005
Statut
Modérateur
Dernière intervention
6 décembre 2023
7 687
26 juil. 2006 à 13:52
26 juil. 2006 à 13:52
Tu veux le faire en batch ou en C ?
En C :
Bonne chance
En C :
#include <stdio.h> #include <unistd.h> #include <stdlib.h> int main(int argc,char **argv){ char *hostname; char * args[4]; if(argc!=2){ printf("usage : %s hostname\n",argv[0]); return 1; } hostname = argv[1]; args[0] = ""; args[1] = hostname; args[2] = "-c2"; // Si tu utilises windows mets args[2] = "" args[3] = NULL; execvp("ping",args); return 0; }
Bonne chance