7 #include <Wt/WApplication.h> 8 #include <Wt/WStringUtil.h> 20 dict.open((WApplication::appRoot() +
"dict-nl.txt").c_str());
22 dict.open((WApplication::appRoot() +
"dict.txt").c_str());
28 getline(dict, retval);
35 int selection = rand() % numwords;
38 getline(dict, retval);
40 getline(dict, retval);
41 for(
unsigned int i = 0; i < retval.size(); ++i)
42 if(retval[i] <
'A' || retval[i] >
'Z')
43 std::cout <<
"word " << retval
44 <<
" contains illegal data at pos " << i << std::endl;
std::wstring RandomWord(Dictionary dictionary)