Can someone tell me what I am doing wrong?
#include <iostream>
#include <string>
using namespace std;
void string replace (string base, string pot, string rex))
{
int location = string base
for (int i=0; i<location.length){
if (i == pot.length)
location.remove
location.replace(r)
}
int main()
{
string b = "this is a test in isolation";
string p = "is";
string r = "isn't";
replace(b, p, r);
cout << b << endl;
}
//trying to output thisn't isn't a test in isn'tolation, replacing is with isn't.
Read: http://www.cplusplus.com/doc/tutorial/functions2.html