I have the following in a text file
How old are you?:I am 1 year old.
Basically, the ":" is the delimiter. "How old are you?" is the question and "I am 1 year old" is what i will reply when i get the question .
There is basically 2 fields in this. I know in C++ i can just do a getline(cin, question, answer,:) specifying the delimiter.
however, i cant do that in c? is there a better way to do it? store the first field in one string variable and 2nd field in another stirng variable?