Concatenation string

#include <iostream>
using namespace std;

int main(){
    string str1 = "Ocean Labz ";
    string str2 = "space for innovation";

    // concatenat string by append() method
    // str1.append(str2);
    // cout<<str1<<endl;

    //concatenat string by '+' oprator
    cout<<"+ oprator"<<endl;
    string add = str1 + str2;
    cout<<add<<endl;
}

    Leave a Reply

    Your email address will not be published.

    Need Help?