[C]modification dans le tableau de structure
Résolu/Fermé
Windy89
Messages postés
4
Date d'inscription
dimanche 4 octobre 2009
Statut
Membre
Dernière intervention
7 avril 2010
-
13 déc. 2009 à 23:05
Windy89 Messages postés 4 Date d'inscription dimanche 4 octobre 2009 Statut Membre Dernière intervention 7 avril 2010 - 17 déc. 2009 à 17:30
Windy89 Messages postés 4 Date d'inscription dimanche 4 octobre 2009 Statut Membre Dernière intervention 7 avril 2010 - 17 déc. 2009 à 17:30
A voir également:
- [C]modification dans le tableau de structure
- Tableau croisé dynamique - Guide
- Tableau word - Guide
- Tableau ascii - Guide
- Suivi de modification word - Guide
- Logiciel gratuit modification pdf - Guide
4 réponses
Bon voilà un petit essaye au niveau de probleme
#include<stdio.h>
#include<string.h>
struct tableau{
char mot1[10];
int x;
};
main()
{
tableau x[33];
strcpy(x[0].mot1,"blabla");
printf("%s\n",x[0].mot1);
strcpy(x[0].mot1,"###");
printf("%s",x[0].mot1);
getchar();getchar();
}
#include<stdio.h>
#include<string.h>
struct tableau{
char mot1[10];
int x;
};
main()
{
tableau x[33];
strcpy(x[0].mot1,"blabla");
printf("%s\n",x[0].mot1);
strcpy(x[0].mot1,"###");
printf("%s",x[0].mot1);
getchar();getchar();
}
Je crois que dans la modification, tu dois utiliser la fonction strcpy de la bibliothèque <string.h>
strcpy(variable_a_modifier,"le texte")
strcpy(variable_a_modifier,"le texte")
Windy89
Messages postés
4
Date d'inscription
dimanche 4 octobre 2009
Statut
Membre
Dernière intervention
7 avril 2010
13 déc. 2009 à 23:23
13 déc. 2009 à 23:23
j'ai essayé mais ça beugue totalement, je ne sais pas pourquoi mais ça ne marche pas
merci pour ton aide quand meme :)
merci pour ton aide quand meme :)
Windy89
Messages postés
4
Date d'inscription
dimanche 4 octobre 2009
Statut
Membre
Dernière intervention
7 avril 2010
17 déc. 2009 à 17:30
17 déc. 2009 à 17:30
merci beaucoup pour votre aide :))