Question about this function

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.
closed account (z05DSL3A)
Read: http://www.cplusplus.com/doc/tutorial/functions2.html
Topic archived. No new replies allowed.