Bonjour à tous,
J'ai besoin de créer des structures voici le code :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
 
#include <stdio.h>
#include <stdlib.h>
struct nom_et_prenom 
    {
      char nom[40], prenom[40];
    };
  struct fiche 
    {
      struct nom_et_prenom identite;
      char email[40];
      float note;
    }
      carnet[100];
 
creer (struct nom_et_prenom id,struct fiche source)
  {
    struct fiche tmp;
    id.nom="B";
  }
main()
{
 
}
J'ai n'ai pas tout noté içi le code de la fonction pour être plus clair.A la compil j'ai cette erreur dont je ne vois pas la cause ;
Str2.c: Dans la fonction «creer» :
Str2.c:20: erreur: incompatible types in assignment
Si quelqu'un peut m'aider merçi.