#include "wx/wx.h"
#endif
+#if wxUSE_IOSTREAMH
#if defined(__WXMSW__) && !defined(GNUWIN32)
#include <strstrea.h>
#else
#include <strstream.h>
#endif
+#else
+#include <strstream>
+using namespace std;
+#endif
#include "scorefil.h"
#include "scoredg.h"
m_font = wxTheFontList->FindOrCreateFont(10, wxSWISS, wxNORMAL, wxNORMAL);
#endif
- wxString* players = 0;
- int length = 0;
- scoreFile->GetPlayerList(&players, length);
+ wxArrayString players;
+ scoreFile->GetPlayerList( players);
ostrstream os;
os << "Player\tWins\tGames\tScore\n";
- for (int i = 0; i < length; i++)
+ for (unsigned int i = 0; i < players.Count(); i++)
{
int wins, games, score;
scoreFile->ReadPlayersScore(players[i], wins, games, score);
char* str = os.str();
m_text = str;
delete str;
- delete players;
}
ScoreCanvas::~ScoreCanvas()