I face a big problem to use 'strtok' on the string. Message from the output is "error C2664: 'strtok' : cannot convert parameter 1 from 'std::string' to 'char *'". Can anybody give some suggessions about this matter?or may be for other approaches. My objective is to search "\n" in the string.
this is my code;
this is my code;
Code:
string x; char delims[]="\n"; char *result=NULL; while(getline(infile, x ,'\n')) { result =strtok(x,delims); istringstream ss(x); { .......... }
Comment