Create a string that is the sum of two strings - C++ STL

C++ examples for STL:string

Description

Create a string that is the sum of two strings

Demo Code

#include <string>
#include <cstdlib>
#include <cstdio>
#include <iostream>
using namespace std;

int main(int argc, char* pArgs[])
{

    cout << "string1 + string2 = " << (string("string 1") + string("string 2")) << endl;

}

Result


Related Tutorials