Here is what I came up with
do {
pos=str.find("fork",pos);
count++;
cout<<"test";
}while (pos!=string::npos);
Type: Posts; User: steven456
Here is what I came up with
do {
pos=str.find("fork",pos);
count++;
cout<<"test";
}while (pos!=string::npos);
So I have a parent string hardcoded in to the code.And I have to find number of times a string appears in the original string.I know that I can find the first occurrence of the string using...