Bonjour, j'essai de créé une interface style "chat" avec wxwidgets, et je veux rassemblé des bout de chaine, dans le but de faire un peut de mise en forme.. mais je n'arrive pas a les rassemblé... voila mon bout de code
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10 void testconsoleFrame::OnTextCtrl2TextEnter(wxCommandEvent& event) { wxString value1 = TextCtrl1->GetValue(); wxString value2 = TextCtrl2->GetValue(); wxStringvalue3 = "Me: " << value2 << "\n"; wxString value4 value1 + value3; TextCtrl1->ChangeValue(value4); TextCtrl2->Clear(); }
et voici l'erreur de compilation
Quelqun peut m'aider? un moyen de contourner ca, ou pour me permettre d'utiliser <<, peut importe, tant que sa marche bien
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13 /home/pierrick/programming/testconsole/testconsoleMain.cpp||In member function void testconsoleFrame::OnTextCtrl2TextEnter(wxCommandEvent&):| /home/pierrick/programming/testconsole/testconsoleMain.cpp|136|error: wxStringvalue3 was not declared in this scope| /home/pierrick/programming/testconsole/testconsoleMain.cpp|136|error: no match for operator<< in "Me: " << value2| /usr/include/wx-2.8/wx/bitmap.h|36|note: candidates are: wxVariant& operator<<(wxVariant&, const wxBitmap&)| /usr/include/wx-2.8/wx/bitmap.h|36|note: wxBitmap& operator<<(wxBitmap&, const wxVariant&)| /usr/include/wx-2.8/wx/colour.h|49|note: wxVariant& operator<<(wxVariant&, const wxColour&)| /usr/include/wx-2.8/wx/colour.h|49|note: wxColour& operator<<(wxColour&, const wxVariant&)| /usr/include/wx-2.8/wx/longlong.h|1071|note: wxTextOutputStream& operator<<(wxTextOutputStream&, long long int)| /usr/include/wx-2.8/wx/longlong.h|1070|note: wxTextOutputStream& operator<<(wxTextOutputStream&, long long unsigned int)| /usr/include/wx-2.8/wx/string.h|1649|note: std::ostream& operator<<(std::ostream&, const wxString&)| /home/pierrick/programming/testconsole/testconsoleMain.cpp|137|error: expected initializer before value1| /home/pierrick/programming/testconsole/testconsoleMain.cpp|138|error: value4 was not declared in this scope| ||=== Build finished: 11 errors, 0 warnings ===|
Partager