Here's what I've got so far... Doesn't really work.
I have the user input as strInput and a function that will need to loop until the user input = "I'm done".
I also have a function at the beginning to keep running the search and replacing as long as the user keeps putting in sentences.
Code:
#include <iostream>
#include <string>
using namespace std;
void searchSTR
string::size_type loc = strInput.find("he", "him", 0)
if( loc = string::npos )
string strInput.replace("he", "he or she", "him", "him or her")
cout << strInput;
int main()
{
cout << "\nPlease enter a gender specific sentence\n";
cout << "or enter `I'm done' to exit the program.\n";
cin >> strInput
do
{
searchSTR
}
while
(strInput != "I'm Done")
return 0;
)
}
I'm not really sure if this helps a great deal, I'm just at a loss of how to get it going. The link you sent before was pretty helpful. Any further helpwould be most appreciated.
Thanks.
WR