An assignment problem
Hi I've this string tokenizer assignment problem. I want to do this by myself but juz need some advise to get started.
Given a header file with these function protoypes:
What is the use of createStringTokenizer()? My understandin is it required 2 arguments, 1 is an array and the other is a char and it return a stringTokenizer.
typedef struct strTokenizerRec *stringTokenizer;
stringTokenizer createStringTokenizer(char, char);
// pre: true,
// post: return a stringTokenzier for char with char as delimiter
void displayLine(stringTokenzier strT);
My input would be something like XXX~XXX~XXX~ after readin from a file. Am I correct to say that the array is the XXX~XXX~XXX~? How abt the char? What would be the output of the stringTokenizer?
Well it appears before you can call nextToken(), you must create a stringTokenizer struct. So you take the array and delimiter, and return a stringTokenizer struct. So the first question is: what is contained within a stringTokenizer struct?