// file: ./examples/example_01.cc // // isip include files // #include #include // main program starts here // int main(int argc, const char **argv) { // declare the sentence as an String object // String sentence(L"Jack and Jill went up to hill"); // get the counts of the words // long count = sentence.countTokens(L" "); // declare the vector of words // Vector words(count); // local variable position that returns position on string where // next delimiter is // long pos = 0; // get each word by tokenizing with the single or multi-space as an // endlimiter // for (long i = 0; i < count; i++) { sentence.tokenize(words(i), pos, L" "); } // print the word on the console // for (long i = 0; i < count ; i++) { words(i).debug(L"word"); } // exit gracefully // Integral::exit(); }