Conjugaison en c++

abdelali62 Messages postés 21 Date d'inscription mercredi 20 février 2008 Statut Membre Dernière intervention 6 novembre 2008 - 6 nov. 2008 à 19:46
cs_rt15 Messages postés 3874 Date d'inscription mardi 8 mars 2005 Statut Modérateur Dernière intervention 7 novembre 2014 - 12 nov. 2008 à 15:16
Bonsoir tt le monde
c'est mon premier programme en c++ j'ai trouve une difficulter a implante le code de la fonction main mais je vais pas besser les bras bain je vous tout que un specialiste me dire est ce que je suis dans le bon chemain et me corrige les fautes du programmes c tt merci ; //fichier .h
#include <stdlib.h>
#include <string.h>
#include <stdio.h>

class Cverbe {
public:
Cverbe();
Cverbe(char*v);
Cverbe(class Cverbe & v);
virtual~Cverbe();

//methode utiliser
void Affiche();
char* GetString();
unsigned int GetGroupe();
bool IsRegular();
Void SetString(char*s);
void SetIsRegular(bool isRegular);
void SetGroupe(Unsigned int g);
unsigned int IdentifierGroupe();
void Conjuguer(char*temp);
protected:
bool m_isRegular;
unsigned int m_groupe;
char*m_string;
};

//fichier .cpp
////////////////////////////
//constructeur par defaut://
////////////////////////////
Cverbe :: Cverbe() {m_string = null; }
///////////////////////////
//constructeur surcharge.//
///////////////////////////
Cverbe :: Cverbe(char*v){
if(verbe != null) { //v est valide
m_string = new char [strlen(v)+1];
m_string = strcpy (m_string ,v);
}

else
m_strin = null;
}
//////////////////////////
//constructeur par copie//
//////////////////////////
Cverbe :: Cverbe ( Cverbe & v){
char*copy=v.GetString();
if (copy != null)
m_string = new char [strlen(copy)+1];
m_string = strcpy (m_string ,copy);
else
m_string = null;

m_IsRegular=v.IsRegular();
m_Groupe = v.GetGroupe();
}
////////////
//Methode//
////////////
char*Cverbe :: Cverbe(){
return m_string ;}
///////////////////////////////////////
void Cverbe :: SetGroupe(unsigned int ){
m_groupe = g; }
///////////////////////////////////////
void Cverbe :: SetString(char*s){
if (m_string !=null )
delete m_string;
if(s != null )
m_string = new char [strlen(s)+1];
m_string = strcpy (m_string ,s);
else
m_string = null;
}
///////////////////////////////////////
void Cverbe :: Affiche(){
// ici j'ai trouve une difficulter à implante la methode affiche
}

//Implantation du code fonction main:</stdio.h></string.h></stdlib.h>

3 réponses

abdelali62 Messages postés 21 Date d'inscription mercredi 20 février 2008 Statut Membre Dernière intervention 6 novembre 2008
6 nov. 2008 à 19:48
je m'excuse pour le programme est mal presente

//fichier .h
#include <stdlib.h>
#include <string.h>
#include <stdio.h>

class Cverbe {
public:
Cverbe();
Cverbe(char*v);
Cverbe(class Cverbe & v);
virtual~Cverbe();

//methode utiliser
void Affiche();
char* GetString();
unsigned int GetGroupe();
bool IsRegular();
Void SetString(char*s);
void SetIsRegular(bool isRegular);
void SetGroupe(Unsigned int g);
unsigned int IdentifierGroupe();
void Conjuguer(char*temp);
protected:
bool m_isRegular;
unsigned int m_groupe;
char*m_string;
};

//fichier .cpp
////////////////////////////
//constructeur par defaut://
////////////////////////////
Cverbe :: Cverbe() {m_string = null; }
///////////////////////////
//constructeur surcharge.//
///////////////////////////
Cverbe :: Cverbe(char*v){
if(verbe != null) { //v est valide
m_string = new char [strlen(v)+1];
m_string = strcpy (m_string ,v);
}

else
m_strin = null;
}
//////////////////////////
//constructeur par copie//
//////////////////////////
Cverbe :: Cverbe ( Cverbe & v){
char*copy=v.GetString();
if (copy != null)
m_string = new char [strlen(copy)+1];
m_string = strcpy (m_string ,copy);
else
m_string = null;

m_IsRegular=v.IsRegular();
m_Groupe = v.GetGroupe();
}
////////////
//Methode//
////////////
char*Cverbe :: Cverbe(){
return m_string ;}
///////////////////////////////////////
void Cverbe :: SetGroupe(unsigned int ){
m_groupe = g; }
///////////////////////////////////////
void Cverbe :: SetString(char*s){
if (m_string !=null )
delete m_string;
if(s != null )
m_string = new char [strlen(s)+1];
m_string = strcpy (m_string ,s);
else
m_string = null;
}
///////////////////////////////////////
void Cverbe :: Affiche(){
// ici j'ai trouve une difficulter à implante la methode affiche
}

//Implantation du code fonction main:</stdio.h></string.h></stdlib.h>
0
abdelali62 Messages postés 21 Date d'inscription mercredi 20 février 2008 Statut Membre Dernière intervention 6 novembre 2008
6 nov. 2008 à 19:49
je ne sais pas pk le web site present le code comme ca
0
cs_rt15 Messages postés 3874 Date d'inscription mardi 8 mars 2005 Statut Modérateur Dernière intervention 7 novembre 2014 13
12 nov. 2008 à 15:16
Illisible... Tu peux pas faire mieux ? Copie colle dans un notepad avant de coller. Essaie avec ton autre navigateur si tu en as deux... Tu as un bouton "Preview Window" dans la barre de la RichTextBox.

Et détaille ton problème :
Echec de la compilation ? -> Quel message d'erreur ?
Plantage à l'exécution ? -> Quel message d'erreur ?
Comportement anormal ? -> Différence entre le comportement attendu et le comportement observé ?
0
Rejoignez-nous