A voir également:
- Ecrire la commande ls
- Invite de commande - Guide
- Commande terminal mac - Guide
- Ecrire en gras sur whatsapp - Guide
- Comment écrire # sur pc - Guide
- Écrire en majuscule - Guide
1 réponse
Voila, on m'a donné comme piste ceci mais je ne comprend rien!!
/*
GESTION DES OPTIONS
*/
main(int ac, char *av[])
int c;
while (c = getopt(ac,av,"ailnh = elp)! = 1)
switch (c) {case 'a' : print f ("option a positionnee \n");
break;
}
/*
GESTION DU TEMPS
*/
lstat (chemin, $info)
#include <time.h>
int m, y;
char *mois[] = {"jan", "fev",...,"dec"};
time_t tps;
struct tm *d;
tps = info.st_mtime;
d = localtime (&tps);
m = d -> tm_mon;
y = 1900 + d -> tm_year;
printf ("%d%s%d%d%d \n", d -> tm_day, mois[m], y, d -> tm_how, d -> tm_min);
struct stat info;
//tableau de pointeur
struct diremt ** contenu_rep;
int nb_entrees, i, b;
nb_entrees = scandir(".", &contenu_rep, 0, alphasort);
for(i = 0; i < nb_entrees; i++)
{
b = lstat (contenu_rep[i] -> d_name, &info);
}
if(S_ISREG(info.st_mode))
/*...*/
if(S_ISREG(info.st_mode))
S_ISLNK
S_ISCHR
S_ISBLK
S_ISFIFO
S_ISSOCK
/*
GESTION DES OPTIONS
*/
main(int ac, char *av[])
int c;
while (c = getopt(ac,av,"ailnh = elp)! = 1)
switch (c) {case 'a' : print f ("option a positionnee \n");
break;
}
/*
GESTION DU TEMPS
*/
lstat (chemin, $info)
#include <time.h>
int m, y;
char *mois[] = {"jan", "fev",...,"dec"};
time_t tps;
struct tm *d;
tps = info.st_mtime;
d = localtime (&tps);
m = d -> tm_mon;
y = 1900 + d -> tm_year;
printf ("%d%s%d%d%d \n", d -> tm_day, mois[m], y, d -> tm_how, d -> tm_min);
struct stat info;
//tableau de pointeur
struct diremt ** contenu_rep;
int nb_entrees, i, b;
nb_entrees = scandir(".", &contenu_rep, 0, alphasort);
for(i = 0; i < nb_entrees; i++)
{
b = lstat (contenu_rep[i] -> d_name, &info);
}
if(S_ISREG(info.st_mode))
/*...*/
if(S_ISREG(info.st_mode))
S_ISLNK
S_ISCHR
S_ISBLK
S_ISFIFO
S_ISSOCK
Alcallee54
Merci pour les réponses!! Il ne fallait pas!!!!!