S
Senger
Hello,
I need separete a string in 2 blocks.
For example:
Which is my favourite fruit?|Orange
Which is my favourite color?|Blue
I try to use string.h functions, but always return problems.
My last tentative was:
if ((fp = fopen(filelong,"r"))!=NULL){
while (fgets(sentence,sizeof(sentence),fp)){
asking=strtok(sentence,"|");
//Return "Which is my
favourite fruit?"
}
The question is: How I can take the second period, with the answer??
Thanks!
I need separete a string in 2 blocks.
For example:
Which is my favourite fruit?|Orange
Which is my favourite color?|Blue
I try to use string.h functions, but always return problems.
My last tentative was:
if ((fp = fopen(filelong,"r"))!=NULL){
while (fgets(sentence,sizeof(sentence),fp)){
asking=strtok(sentence,"|");
//Return "Which is my
favourite fruit?"
}
The question is: How I can take the second period, with the answer??
Thanks!