anyone please help me to do this problem......
3 Replies
#include <iostream>
using namespace std;
int main()
{
string s1, s2, result;
cout << "Enter string s1: ": getline (cin, s1);
cout << "Enter string 52: getline (cin, s2);
result = s1 + s2;
cout << "Resultant String = "<< result:
return 0;
}
Please check your code.
There are various ways to concatenate strings.
Method 1: Using strcat() function.
Method 2: Using append() function.
Method 3: Using ‘+’ Operator
Great, it's working now:) . . Thanks for ur advice...