bonjour![]()
j'ai un probl avec le code suivant :
en fait le compilo me signale des 5 erreurs !!
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34 std::string Livre::reqLivreFormate() const { ostringstream format; format<<"Theme : " << m_theme <<"\n" <<"Titre : " <<m_titre <<"\n" <<"Auteur(s) :" <<m_auteurs <<"\n" <<"Annee d'edition : " <<m_anneeEdition <<"\n" <<"Editeur : " <<m_editeur <<"\n" <<"Nombre de pages : " <<m_nbPages <<"\n" <<"ISBN : " <<m_isbn <<"\n" <<"Langue : " <<m_langue <<"\n" <<"Date d'acquisition : " //<<m_dateAcquisition <<"\n"; std::cout<<format.str(); std::cout<<"\n"; }
les voici:
j'ai bien inclu la bilio <sstream> !!c:\documents and settings\administrateur\bureau\tp1 poo\principale\livre.cpp(89) : error C2065: 'ostringstream' : undeclared identifier
c:\documents and settings\administrateur\bureau\tp1 poo\principale\livre.cpp(89) : error C2146: syntax error : missing ';' before identifier 'format'
c:\documents and settings\administrateur\bureau\tp1 poo\principale\livre.cpp(89) : error C2065: 'format' : undeclared identifier
c:\documents and settings\administrateur\bureau\tp1 poo\principale\livre.cpp(91) : error C2297: '<<' : illegal, right operand has type 'char [9]'
c:\documents and settings\administrateur\bureau\tp1 poo\principale\livre.cpp(117) : error C2228: left of '.str' must have class/struct/union type
Error executing cl.exe.
est ce que vous pouvez m'expliquez le probl?
merci![]()
Partager