Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
1870 connectés 

  FORUM HardWare.fr
  Programmation

  [C] "Improper use of a typedef symbol"

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

[C] "Improper use of a typedef symbol"

n°116999
Dawa
www.shootmeagain.com
Posté le 24-03-2002 à 23:19:40  profilanswer
 

voilà j'ai un pti probleme avec un pti travail, en fait ca met le message d'erreur que j'ai ecrit dans le titre par rapport a ce que j'ai mis en gras. mon typedef est en souligné. je vois pas trop comment je pourrais faire d'autre, en sachant que je ne peux pas utiliser de fichier pour ce vecteur...
 
 
 
 
 
 
#include<conio.h>
#include<stdio.h>
 
struct livre
{
int num;
char titre[20];
char auteur[20];
char editeur[20];
int present;
char emprunt[20];
char date[9];
char retour[9];
};
 
struct index
{
int num;
char titre[20];
};
 
typedef struct index vec[150];
 
void creation(int);
void listage(int);
void affiche(struct livre *);
void creindex(int);
 
/************************ DEBUT FCT MAIN *************************/
 
main()
{
 
int choix=0,pass=1981,essai,taille=150;
 
while(choix!=0)
  {
  clrscr();
  printf("\n\t\tÚÄÄÄÄÄÄÄÄÄÄ¿" );
  printf("\n\t\t³   MENU   ³" );
  printf("\n\t\tÀÄÄÄÄÄÄÄÄÄÄÙ" );
  printf("\n\n\n" );
  printf("\n\t1\tCr?er le fichier" );
  printf("\n\t2\tLister les livres" );
  printf("\n\t0\tQuitter" );
  printf("\n\t\t\tVotre choix : " );
  scanf("%d",&choix);
 
  switch(choix)
 {
 case 1:
   clrscr();
   printf("\n\n\tEntrez le mot de passe :" );
   scanf("%d",&essai);
   if(essai==pass)
  creation(taille);
   break;
 case 2:
   listage(taille);
   break;
 }
  }
getch();
}
 
/************************** FIN FCT MAIN *************************/
 
/************************ DEBUT FCT CREATION *********************/
 
void creation(int taille)
{
 
int i;
FILE *p;
struct livre vide={0,"","","",0,"","",""};
struct livre fich1;
 
p=fopen("c:\\etudiant\\dawa.dat","wb" );
 
for(i=0;i<taille;i++)
  {
  fwrite(&vide,sizeof(vide),1,p);
  }
 
 
 
 
p=fopen("c:\\etudiant\dawa.dat","rb" );
 
for(i=0;i<taille;i++)
  {
  fread(&vide,sizeof(vide),1,p);
  vec[i].num=fich1.num;
  strcpy(fich1.titre,vec[i].titre);
 }
 
fclose(p);
 
}
 
/************************** FIN FCT CREATION *********************/


---------------
SHOOT ME AGAIN WEBZINE
mood
Publicité
Posté le 24-03-2002 à 23:19:40  profilanswer
 

n°117000
verdoux
And I'm still waiting
Posté le 24-03-2002 à 23:22:41  profilanswer
 

Enlève "typedef"

n°117002
Dawa
www.shootmeagain.com
Posté le 24-03-2002 à 23:27:14  profilanswer
 

alors toi je t'aime  :ouch:  :love:  :jap:


---------------
SHOOT ME AGAIN WEBZINE

Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation

  [C] "Improper use of a typedef symbol"

 

Sujets relatifs
[C/C++]besoin d'aide pour les struct typedef struct etc....problème, les focntions opengl me donnent unresolved external symbol
[VC++] unresolved external symbol _wWinMain@16c++ : la galère des unresolved external symbol
Plus de sujets relatifs à : [C] "Improper use of a typedef symbol"


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR