X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dd107c50be43e8d4dbdba20df162faf119a3781c..81ba2662b188f62ee9a04501d89ce83be1bbec54:/demos/forty/scoredg.cpp diff --git a/demos/forty/scoredg.cpp b/demos/forty/scoredg.cpp index 9f96c6135d..39f8f5eacb 100644 --- a/demos/forty/scoredg.cpp +++ b/demos/forty/scoredg.cpp @@ -11,7 +11,7 @@ // Last modified: 22nd July 1998 - ported to wxWindows 2.0 ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(__APPLE__) #pragma implementation #pragma interface #endif @@ -27,16 +27,6 @@ #include "wx/wx.h" #endif -#if wxUSE_IOSTREAMH -#if defined(__WXMSW__) && !defined(__GNUWIN32__) && !defined(__MWERKS__) -#include -#else -#include -#endif -#else -#include -//using namespace std; -#endif #include "scorefil.h" #include "scoredg.h" @@ -66,9 +56,9 @@ ScoreCanvas::ScoreCanvas(wxWindow* parent, ScoreFile* scoreFile) : wxArrayString players; scoreFile->GetPlayerList( players); - ostrstream os; + wxString os; - os << "Player\tWins\tGames\tScore\n"; + os << wxT("Player\tWins\tGames\tScore\n"); for (unsigned int i = 0; i < players.Count(); i++) { int wins, games, score; @@ -79,15 +69,13 @@ ScoreCanvas::ScoreCanvas(wxWindow* parent, ScoreFile* scoreFile) : average = (2 * score + games) / (2 * games); } - os << players[i] << '\t' - << wins << '\t' - << games << '\t' - << average << '\n'; + os << players[i] << wxT('\t') + << wins << wxT('\t') + << games << wxT('\t') + << average << wxT('\n'); } - os << '\0'; - char* str = os.str(); - m_text = str; - delete str; + os << wxT('\0'); + m_text = os; } ScoreCanvas::~ScoreCanvas()