Enregistrement en c

Fermé
sapime - 27 janv. 2011 à 12:04
Char Snipeur Messages postés 9813 Date d'inscription vendredi 23 avril 2004 Statut Contributeur Dernière intervention 3 octobre 2023 - 27 janv. 2011 à 12:30
Bonjour,
je voudrais savoir comment c'est la syntaxe en langage c pour creer un tableau d'enregistrement. je sais deja pour la creation d'un enregistrement
struct nom_enregistrement
type1: variable 1
type2: variable 2
.
.
typen: variable n
struct variable= nom_enregistrement


A voir également:

1 réponse

Char Snipeur Messages postés 9813 Date d'inscription vendredi 23 avril 2004 Statut Contributeur Dernière intervention 3 octobre 2023 1 297
27 janv. 2011 à 12:30
c'est presque ça...
struct nom_enr
{
   type1  var1;// pas de ":"
   type2  var2;
   ...
};
//pour une variable simple :
struct nom_enr variable;
// pour un tableau de 51 elements :
struct nom_enr tab[51];
0