String find & replace

"C++ is a general-purpose programming language." I have to find the word "C++" and replace it with "Java" and then capitalize all letters. I have the simple outline of the program but still need some help. Thanks.

#include <iostream>
#include <string>

using namespace std;

int main( )
{
string origin; //contains input string
string replace; //the string obtained by replacing "C++" with "Java"
string capital; //convert chars in the string "modified" to upper case
int position; //the starting position of the substr "C++"


getline(cin, original);

?




cout << "The original string is: \n\t" << origin << endl
<< "After replacing C++ with Java: \n\t" << replace << endl
<< "Converting to upper case: \n\t" << capital << endl;

return 0;
}

Topic archived. No new replies allowed.