Geezy1984
asked on
String Replacer
I am trying to write a program that will replace the word he in a string with she or he this is my code soo far and I am stuck on if I am going in the right direction or not... or what I should do from here if I am going in the right direction:
#include <iostream>
using namespace std;
string::size_type = unsigned int u[npos]
string str1 = "school";
string::size_type
pos=str1.find("he")
pos=str1.find("him")
pos=str1.find("his")
if (pos==npos)
}
void replace(string&stmt, string source, string test)
{
}
int main (){
cin >> getline.stmt;
replace (stmt, "he", "she or he");
replace (stmt, "him", "her or him");
replace (stmt, "his", "her(s) or his");
}
start loop
{
pos=startfind(source,start )
if(pos!=npos)
{
case:1
#include <iostream>
using namespace std;
string::size_type = unsigned int u[npos]
string str1 = "school";
string::size_type
pos=str1.find("he")
pos=str1.find("him")
pos=str1.find("his")
if (pos==npos)
}
void replace(string&stmt, string source, string test)
{
}
int main (){
cin >> getline.stmt;
replace (stmt, "he", "she or he");
replace (stmt, "him", "her or him");
replace (stmt, "his", "her(s) or his");
}
start loop
{
pos=startfind(source,start
if(pos!=npos)
{
case:1
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.