appending one string to another?

Hi guys, I am trying to take 2 user input strings and add them together.

I have one string text and another string extra. I want to output both of these together.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
int main()
{
     string text, extra;

     cout << "Please enter your text: " << endl;
     getline(cin, text)
     cout << "You have enter: " << text << endl;

     cout << "Please enter what you would like to add to your text: " << endl;
     getline(cin, extra);
     cout << "Your text is now: " << output text string and extra string together << endl;

return EXIT_SUCCESS
}
string class has operator + already defined, so just say text+extra
Oh, awesome! Simple enough LOL thanks!
Topic archived. No new replies allowed.