I am reading a line through standard input using
string str;
getline(cin,str);
now if i want to use the str to tokenize it using strtok , it says str should be char*.
What should i do?
I did try using gets(where i can use str by defining it char*), but a warning pops up saying "gets is being used. It is not safe" when running the program. i do not want that.