Concatenation between strings in C++
Concatenation combines two or more
strings together. Here is a code to understand its concept:
#include <iostream>
#include <string>
using namespace std;
void main() {
string a("abcd efg");
string b = "xyz ijk";
string c = a + b; // concatenation
cout << "First character of
" << c << endl; // as in C
system("pause");
}
No comments:
Post a Comment