no save
Assistance
Achat
News

Forum | programmation
la classe en c++
lamte01, le jeu. 25 juin 2009 à 14:12:17
Bonjour,
mon programe ne se compile pas voici le fichier source
non du fichier lamte.h
#ifndef lamte
#define lamte
#include<stirng.h>
class ls {private:
char nom[20];
char prenom[20];
int age;
public:
ls(char n[20],char p[20],int a);
void saisir();
void afficher(); };
ls::ls(char n[20],char p[20],int a)
{ string(n,nom);
string(p,prenom);
a=age;}
void saisir::ls()
{ cout<<"donner votre nom ";cin>>nom;
cout<<"donner votre prenom ";cin>>prenom;
cout<<"donner votre age ";cin>>age;}
void afficher::ls() {cout<<"je m'appelle "<<nom<<" "<<prenom<<"\n";
cout<<"jai "<<age<<"\n"; }
#endif
nom du fichier lamte.c++
#include<iostream.h>
#include"lamte.h"
main( )
{ ls A; A.saisir(); A.afficher(); }
MerciConfiguration: Windows XP Internet Explorer 7.0


Nabla's
25 juin
Suivant
REPONSES
Nabla's
25 juin
lamte01
25 juin
Nabla's
25 juin
lamte01
25 juin
Nabla's
25 juin
Version Web
Réalisé par RedShift
no save