Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

C++ strtok(); and strings


ghost's Avatar
0 0

i've read about function strtok(); which can separate strings. but i can only use char for this. is there any possiblity to use the string instead of char?

thanks


ynori7's Avatar
Future Emperor of Earth
0 0

you dont need a built in string tokenizer. you can do it easily with just a for loop.

also, i may be wrong, but i think the strtok function is for C not C++.


ghost's Avatar
0 0

it's working in C++ too