Trying to relearn C/C++ why is it when I run this:
char* tmp;
while ((tmp = strtok(itr->c_str(),' ')) != NULL ) {
std::string s(tmp);
cout << "S " << s<< endl;
}
I obtain this:
/usr/include/c++/4.8.3/bits/basic_string.h:437:7: note: candidate expects 0 arguments, 1 provided
It is either that or I do not have enough arguments. I know tmp is not NULL because I am checking it in my while loop. It also happens when I try string s = string(tmp);
I see the documentation and I thought I copied it down similarly except for my needs. I am obviously missing something.
Any feed back please?