/////////////////////////////////////////////////////////////// // tok.cpp -- read words from ASCII file // // ver 2.2 // // Language: Visual C++, ver 6.0 // // Platform: Micron Dual Pentium Pro 200, Win NT 4.0 // // Application: CSE784 Example // // Author: Jim Fawcett, CST 2-187, Syracuse Univ. // // (315) 443-3948, fawcett@ecs.syr.edu // /////////////////////////////////////////////////////////////// //----< test stub >-------------------------------------------- #ifdef TEST_TOK #include #include #include "tok.h" #include #include void main(int argc, char *argv[]) { ifstream in; toker tok(in); tok.collectSingleQuotes(false); string buffer; if(argc == 1) { cout << "\n please enter file name on command line\n\n"; return; } int i; for(i=1; i") + string("") + string("") + string("test1.h") + string("test1.cpp") + string("test2.h") + string("test2.cpp") + string("test3.h") + string("test3.cpp"); istringstream sin(xmlStr); toker strTok(sin); cout << "\n processing xml string\n\n"; while(strTok.getTok(buffer)) { if(buffer[0] == '\n') cout << "newline\n"; else cout << buffer << '\n'; } in.close(); in.clear(); cout << "\n\n"; } #endif