Code c++
nyn92
Messages postés
2
Date d'inscription
Statut
Membre
Dernière intervention
-
[Dal] Messages postés 6205 Date d'inscription Statut Contributeur Dernière intervention -
[Dal] Messages postés 6205 Date d'inscription Statut Contributeur Dernière intervention -
Bonjour, jai ici un code en c++ que j v compilé et qui me réclame un';' avant le int main que j n voit pas pouvez vous m'aider stp.
#include <cstdlib>
#include <iostream>
#include<string.h>
#include<conio.h>
#include<stdlib.h>
using namespace std;
void Menu()
{
cout<<"1:----------------Creer un nouveau repertoire--------"<<endl;
cout<<"2:----------------Ajouter un nouveau contact---------"<<endl;
cout<<"3:----------------Supprimer un contact---------------"<<endl;
cout<<"4:----------------Afficher tous les contacts---------"<<endl;
cout<<"5:----------------Afficher tous les contact(avec tri)-"<<endl;
cout<<"6:----------------Afficher tous les amis(avec tri)----"<<endl;
cout<<"7:----------------Rechercher un contact---------------"<<endl;
cout<<"8:----------------Vider le repertoire-----------------"<<endl;
cout<<"0:----------------Quitter-----------------------------"<<endl;
cout<<"Faite un choix"<<endl;
}
void addcontact(int t[],int tayrep)
{
int i;
for(i=0; i<=tayrep;i++)
{
string nm;
int num;
char c;
cout<<"Nom:"<<endl;
cin>>nm;
cout<<"Numero:"<<endl;
cin>>num;
// if ((num < 100000000) || (num > 999999999))
//cout << "Le numero "<<num<<" parait errone." << endl;
//cout<<"Ce contact est-il un contac ami?(y/n)"<<endl;
//cin>>c;
/*if(c=='y')
{
string adresse;
string bp;
string mail;
cout<<"Adresse"<<endl;
cin>>adresse;
cout<<"BP"<<endl;
cin>>bp;
cout<<"E_mail"<<endl;
cin>>mail;
}*/
}
int main()
{
int a;
int n;
int t[n];
Menu();
cin>>a;
if(a==1)
{
cout<<"Donner la taille du répertoire"<<endl;
cin>>n;
cout<<"Le repertoire a ete cree avec succes"<<endl;
cout<<"Voulez-vous enrégistrer un contact(y/n)"<<endl;}
system("PAUSE");
return 0;
}
#include <cstdlib>
#include <iostream>
#include<string.h>
#include<conio.h>
#include<stdlib.h>
using namespace std;
void Menu()
{
cout<<"1:----------------Creer un nouveau repertoire--------"<<endl;
cout<<"2:----------------Ajouter un nouveau contact---------"<<endl;
cout<<"3:----------------Supprimer un contact---------------"<<endl;
cout<<"4:----------------Afficher tous les contacts---------"<<endl;
cout<<"5:----------------Afficher tous les contact(avec tri)-"<<endl;
cout<<"6:----------------Afficher tous les amis(avec tri)----"<<endl;
cout<<"7:----------------Rechercher un contact---------------"<<endl;
cout<<"8:----------------Vider le repertoire-----------------"<<endl;
cout<<"0:----------------Quitter-----------------------------"<<endl;
cout<<"Faite un choix"<<endl;
}
void addcontact(int t[],int tayrep)
{
int i;
for(i=0; i<=tayrep;i++)
{
string nm;
int num;
char c;
cout<<"Nom:"<<endl;
cin>>nm;
cout<<"Numero:"<<endl;
cin>>num;
// if ((num < 100000000) || (num > 999999999))
//cout << "Le numero "<<num<<" parait errone." << endl;
//cout<<"Ce contact est-il un contac ami?(y/n)"<<endl;
//cin>>c;
/*if(c=='y')
{
string adresse;
string bp;
string mail;
cout<<"Adresse"<<endl;
cin>>adresse;
cout<<"BP"<<endl;
cin>>bp;
cout<<"E_mail"<<endl;
cin>>mail;
}*/
}
int main()
{
int a;
int n;
int t[n];
Menu();
cin>>a;
if(a==1)
{
cout<<"Donner la taille du répertoire"<<endl;
cin>>n;
cout<<"Le repertoire a ete cree avec succes"<<endl;
cout<<"Voulez-vous enrégistrer un contact(y/n)"<<endl;}
system("PAUSE");
return 0;
}
A voir également:
- Code c++
- Code ascii - Guide
- Code puk bloqué - Guide
- Comment déverrouiller un téléphone quand on a oublié le code - Guide
- Code activation windows 10 - Guide
- Code blocks - Télécharger - Langages