bonjour les amis..j'ai écrit un code source pour gerer une agence de location de voiture.cependant lors de l'execution du programme,une erreur s'affiche: "undefined reference to winmain@16"
au lieu de main j'ai écrit winmain mais cété pas la solution.
svp si quelqu'un pouvait m'aider,je serais très reconnaissant..
j'aimerais bien vous uploader le programme afin que vous m'aidiez mais je sais pas comment le faire à moins que je l'upload sur un serveur et je poste ici le lien.
svp veuillez m'aider
cordialement..
stoner2008
#include "systeme.h"
listec saisiec(listec l);
listev saisiev(listev l);
void affiche_client(listec l);
void affiche_voiture(listev l);
int rechercher_client(listec l,long x);
int rechercher_voiture(listev l,long x);
void afficher_un_client(listec l,int x);
void afficher_une_voiture(listev l,int x);
void afficher_location(listel l);
//gestion entree sortie du parc
listel location_v(listel l1,listev l2,listec l3);
listel rentree_voiture(listel l1,listev l2);
//modification
listev modifier_voiture(listev l);
listec modifier_client(listec l);
//enregistrement dans des fihiers
void enregistrer_client(listec l);
void enregistrer_voiture(listev l);
void enregistrer_location(listel l);
//chargement a partir des fichiers
listec charger_client(listec l);
listev charger_voiture(listev l);
listel charger_location(listel l);
listev suuprimer_voiture(listev l);//appel a la fonction pour supprimer la voiture
//-----------------------------------------------------------------
void main()
{
int w,trouve;
char save;
long c;
listec liste_client;
listev liste_voiture;
listel liste_location;
liste_client=NULL;
liste_voiture=NULL;
liste_location=NULL;
system("COLOR 0c");
liste_client=charger_client(liste_client);
liste_voiture=charger_voiture(liste_voiture);
liste_location=charger_location(liste_location);
// printf("\n\n\n\n\n\n\n");
// printf(" ** ********* ********* ********** ** ****** ** **\n");
// printf(" ****** ********* ********* ********** ** ******** *** **\n");
// printf(" ******** ** ** ** ** ** ** **** **\n");
// printf(" *** ** ** ** ** ** ** ** ** **\n");
// printf(" ** ********* ********* ** ** ** ** ** ** **\n");
// printf(" ** ********* ********* ** ** ** ** ** ** **\n");
// printf(" ** *** ** ** ** ** ** ** ** ** **\n");
// printf(" *** *** ** ** ** ** ** ** ** ****\n");
// printf(" ******** ********* ********* ** ** ******** ** ***\n");
// printf(" ***** ********* ********* ** ** ****** ** **\n");
// printf("\n\n\n\n\n\n\n");
// Sleep(2500);
// system("cls");
// printf("\n\n\n\n\n\n\n");
// printf(" ******** ********* \n");
// printf(" ********* ********* \n");
// printf(" ** *** ** \n");
// printf(" ** *** ** \n");
// printf(" ** *** ********* \n");
// printf(" ** *** ********* \n");
// printf(" ** *** ** \n");
// printf(" ** *** ** \n");
// printf(" ********* ********* \n");
// printf(" ******** ********* \n");
// printf("\n\n\n\n\n\n\n");
// Sleep(2500);
// system("cls");
// printf("\n\n\n\n\n\n\n");
// printf("** ****** ******* ********** ******** ** ****** ** ** \n");
// printf("** ********* ******* ********** ******** ** ******** *** ** \n");
// printf("** ** ** ** ** ** ** ** ** ** *** ** \n");
// printf("** ** ** ** ** ** ** ** ** ** ** ** ** \n");
// printf("** ** ** ** ********** ** ** ** ** ** ** ** \n");
// printf("** ** ** ** ** ** ** ** ** ** ** ** ** \n");
// printf("** ** ** ** ** ** ** ** ** ** ** ** ** \n");
// printf("** ** ** ** ** ** ** ** ** ** ** **** \n");
// printf("****** ********* ****** ** ** ** ** ******** ** *** \n");
// printf("****** ******* ******* ** ** ** ** ****** ** ** \n");
// printf("\n\n\n\n\n\n\n");
// Sleep(2500);
//system("cls");
//
//system("COLOR 1E");
printf("\n\n\n\n GESTION LOCATION DE VOITURE V2.1\n\n");printf("\n\n");
for(int s=0;s<80;s++)
putchar(260);
printf("\n");
printf(" ________________ \n");
printf(" / --<---<---<-- \n");
printf(" _ ___/ --<---<---<-- \n");
printf(" |__ __ ______ --<---<---<-- \n");
printf(" (__)----------(__) \n");
for(int z=0;z<80;z++)
putchar(260);printf("\n\n");
printf(" developpee par:Wael Ben Yahia \n\n\n");
printf("\n\n\n\tChargement");
for(int i=1;i<36;i++)
{
Sleep(200);//attente
printf(".");
}system("cls");
do
{system("COLOR 1e");
printf("\n\n");
printf("\n\n\n\t\t\t GESTION LOCATION DE VOITURE V2.1\n\n");
printf(" ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍMENUÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»\n");
printf(" º ----------------------------------------------------- º\n");
printf(" º ( | 1 | Ajouter Client ) º\n");
printf(" º º\n");
printf(" º ( | 2 | Ajouter Voiture ) º\n");
printf(" º º\n");
printf(" º ( | 3 | Afficher les Clients ) º\n");
printf(" º º\n");
printf(" º ( | 4 | Afficher les Voitures ) º\n");
printf(" º º\n");
printf(" º ( | 5 | Chercher Client ) º\n");
printf(" º º\n");
printf(" º ( | 6 | Chercher Voiture ) º\n");
printf(" º º\n");
printf(" º ( | 7 | Modifier Client ) º\n");
printf(" º º\n");
printf(" º ( | 8 | Modifier Voiture ) º\n");
printf(" º º\n");
printf(" º ( | 9 | Louer Voiture ) º\n");
printf(" º º\n");
printf(" º ( | 10| Rentree Voiture ) º\n");
printf(" º º\n");
printf(" º ( | 11| Supprimer Voiture ) º\n");
printf(" º º\n");
printf(" º ( | 12| Afficher les voiture louees ) º\n");
printf(" º º\n");
printf(" º ( | 0 | EXIT ) º\n");
printf(" º ----------------------------------------------------- º\n");
printf(" ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ\n");
printf(" * Entrer Votre Choix *\t");
scanf("%d",&w);
if(w==1)
{ system("cls");
liste_client=saisiec(liste_client);
system("cls");
}
if(w==3)
{
system("cls");
if(liste_client==NULL)
{system("COLOR 0c");printf("\n\n\t\tERROR liste de clients vide\a");Sleep(1000);}
else
affiche_client(liste_client);
getchar();system("cls");}
if(w==2)
{system("cls");//effacer l'ecran
liste_voiture=saisiev(liste_voiture);
system("cls");}
if(w==4)
{system("cls");
if(liste_voiture==NULL)
{system("COLOR 0c");printf("\n\n\tERROR liste voiture vide\a");Sleep(1000);}
else
affiche_voiture(liste_voiture);
getchar();
system("cls");}
if(w==5)
{system("cls");
if(liste_client==NULL)
{system("COLOR 0c");printf("\n\t\tERROR liste de clients vide\a");Sleep(1000);}
else
{printf("\n\tdonner le numero de la carte d'identite du client:\t");
scanf("%ld",&c);
trouve=rechercher_client(liste_client,c);
if(trouve==-1)
{
printf("\n\n\t\tERROR Client inexistant\a");
getchar();
}
else
{ afficher_un_client(liste_client,trouve);
getchar();
getchar();
}
}system("cls");
}
if(w==7)
{system("cls");
if(liste_client==NULL)
{system("COLOR 0c");
printf("\n\n\t\tERROR liste de clients vide\a");Sleep(1000);}
else
liste_client=modifier_client(liste_client);
getchar();system("cls");
}
if(w==6)
{system("cls");
if(liste_voiture==NULL)//test si la liste voiture est vide
{system("COLOR 0c");printf("\n\n\t\tERROR liste de voiture vide\a");Sleep(1000);}
else
{printf("\ndonner Code Agence de voiture:\t");
scanf("%ld",&c);
trouve=rechercher_voiture(liste_voiture,c);
if(trouve==-1)
{
printf("\n\t\tERROR voiture inexistante\a");
getchar();
system("cls");
}
else
{ afficher_une_voiture(liste_voiture,trouve);
getchar();getchar(); }
}system("cls");
}
if(w==9)
{system("cls");
if((liste_client==NULL)||(liste_voiture==NULL))
{system("COLOR 0c");printf("\n\n\t\tERROR liste Client ou Voiture vide\a");Sleep(1000);}
else
liste_location=location_v(liste_location,liste_voiture,liste_client);
getchar();
//getchar();
system("cls");
}
if(w==10)
{system("cls");
if(liste_location==NULL)
{system("COLOR 0c");printf("\n\n\t\tpas de voiture deja louee\a");Sleep(1000);}
else
liste_location=rentree_voiture(liste_location,liste_voiture);
getchar();
//getchar();
system("cls");
}
if(w==8)
{system("cls");
if(liste_voiture==NULL)
{system("COLOR 0c");printf("\n\tERROR liste de voitures vide\a");Sleep(1000);}
else
liste_voiture=modifier_voiture(liste_voiture);
getchar();system("cls");
}
if(w==12)
{system("cls");
if(liste_location==NULL)
{system("COLOR 0c");printf("\n\n\t\tpas de voiture deja louee\a");Sleep(1000);}
else
afficher_location(liste_location);
getchar();
//getchar();
system("cls");
}
if(w==11)
{
system("cls");
liste_voiture=suuprimer_voiture(liste_voiture);
getchar();
system("cls");
}
system("cls");
}while(w!=0);
system("COLOR 0c");
printf("\n\n\tsi vous voulez sauvegarder les donnees taper 1\n\t");
save=getch();
if(save=='1')
{
enregistrer_client(liste_client);
enregistrer_voiture(liste_voiture);
enregistrer_location(liste_location);
for(int k=0; k<4; k++)
{
system("cls");
Sleep(300);
for(int t=0; t<11; t++)
printf("\n");
//printf(" ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»\n");
//printf(" º º\n");
printf(" Sauvegarde des donnees ");
//printf(" º º\n");
//printf(" ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ");
Sleep(500);
}
}
else
{ printf("\n\n\t\tfermeture\n\n");}
}
Afficher la suite