Bonjour a tous,
j'ai un probleme qui doit surement paraitre simple pour vous mais qui est completement incomprehensible pour moi:
Le compilateur ( Visual c++ express ) me rapporte une erreur "identificateur non déclaré" pour m_FichierTexte a la derniere ligne. Par contre, il n'y a plus d'erreur si j'enleve le "//" devant l'avant derniere ligne. Je suis tres perplexe.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14 ifstream m_TestFichier("SemaineX.txt"); if (!m_TestFichier.is_open()) { ofstream m_FichierTexte("SemaineX.txt"); } else { ofstream m_FichierTexte("SemaineX.txt", ios_base::app ); } m_TestFichier.close(); //ofstream m_FichierTexte("SemaineX.txt"); m_FichierTexte<<"Bonjour"<<endl;
Merci beaucoup pour votre aide
Partager