diff -r 5331bd08a294 -r 01dafa022fa1 cpp/main.cpp --- a/cpp/main.cpp Sun Feb 13 07:57:02 2011 +0100 +++ b/cpp/main.cpp Sun Feb 13 08:11:31 2011 +0100 @@ -3,7 +3,10 @@ #include #include #include +#include +#include +#include "main.hpp" #include "MainWindow.hpp" class MyApp : public wxApp @@ -14,11 +17,33 @@ IMPLEMENT_APP(MyApp) +std::vector words; + +void +loadwords() +{ + std::ifstream f("words.txt"); + + do + { + std::string s; + std::getline(f,s); + if (!f.fail()) + { + words.push_back(s); + std::cerr << "Loaded: " << s << std::endl; + } + }while(!f.fail()); + +} + bool MyApp::OnInit() { if(!wxApp::OnInit()) return false; + loadwords(); + MainWindow *mw = new MainWindow(); mw->Show(); SetTopWindow(mw);