This is the Last two questions in my Homework,
Please give em some hints...

1. Write afunction named replace that takes three strings arguments:
void replace ( string bas, string pattern, string replacement);

this function should replace all instances of the pattern in the base string. Note that the replacement string may not be the same lenghth as the pattern should not be replaced. For example, if the base string is " all in good time," the pattern " good," and the replacement " very good," your procedure should avoid going into an infinite loop..

That was the second from the last ... I gave up thinking about this one....

I will give it to you... while I will be thinking about the last one...

Please help me.... I will be helping some guys in the future...

Thank you.... ALL