hi,Code:location = temp_string.find(search_string);
if(location > -1)
{
cout << "found!" << endl;
}
else
{
cout << "not found!" << endl;
}
in this code, i'm searching for the search_string in the temp_string.
when the search_string is one word such as "text" and in "text" is in temp_string at location 1 or greater, then my code says found!. however, i have a line that starts out with "text" so its in location 0. my code says "not found!"
in other words, if i have a word at location 0, it doesn't return 0 and if i have the word at location 1 or higher, then it does return that number into location.
i don't think its supposed to happen like that. in the past i found an error in getline thank to y'all. i'm using msvc++6 with sp6.
any suggestions?
thanks,
barneygumble742