hey,
i have to use the commands find and replace to replace all the occurrences of sydney to melbourne.
I have did this, but not sure if im on the right track:
can anyone tell me if i solved this correctly,
thankss
i have to use the commands find and replace to replace all the occurrences of sydney to melbourne.
I have did this, but not sure if im on the right track:
Code:
#include <string.h>
#include <iostream>
#include <conio.h>
using namespace std;
int main()
{
string s1="sydney";
cout << s1.replace(1,6,"melbourne",9);
getch();
return 0;
}
thankss
Comment