Ajouter un commentaire

Niroken
Re: ecrire et lire un fichier txt

Hello

Pour corriger ton problème tu enlève le dernier saut de ligne quand tu définis ton opérateur << .

ostream &operator<<(ostream &out, matiere mat)
{
   out<<endl;
   out<<mat.m_nom;
   out<<"\t";
   out<<mat.m_cof;
   return out;
}

Bonne chance,
Niroken

Filtered HTML

Plain text

CAPTCHA
Cette question permet de vérifier que vous n'êtes pas un robot spammeur :-)
 III  X   X  V     V  K  K  Y   Y 
I X X V V K K Y Y
I X V V KK Y
I X X V V K K Y
III X X V K K Y