I want to use tokenizer function using string not char
How to do that ??
In video with the help of char is explained please tell how to use same with string ??
String Tokenization
Hey @ashwani225
>#include <string>
#include <iostream>
int main()
{
string theString("hello world");
char *token = strtok((char *)(theString.c_str()), " ");
cout<<token;
return 0;
}
```This is how it can be used with string
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.