Below is the file 'tokens_test.cc' from this revision. You can also download the file.
#include <iostream> #include "tokens.hh" typedef Tokens<std::string> s_tok; void string_test (s_tok &t) { std::string s; t.add ("goat"); t.add ("cheese"); t.add ("chhhhhhhhhheeeese"); } void input_test (s_tok &t) { std::string i; for (int c=0;c<5;c++) { std::cin >> i; t.add (i); } } void test (void) { s_tok t; string_test (t); input_test (t); t.playback (); } int main (int argc, char *argv[]) { test (); return 0; }