Code:
#include <string>
#include <iostream>
using namespace std;
int main(){
string s1="123"; //Set up string 1
string s2="456"; //Set up string 2
string s3; //Setup string 3
cout<<"First string: "<<s1<<endl;
cout<<"Second string: "<<s2<<endl;
s3=s1; //Copy string 1 into string 3
for(int i=0;i<s2.size();i++){ //Loop through s2
char c=s2[i]; //Grab current character from s2
bool is_c_in_s3=true;
for(int j=0;j<s3.size();j++){ //Loop though s3
cout<<"Figure this portion out yourself."<<endl;
}
if(is_c_in_s3){
s3+=c; //Add the element to String 3
}
}
cout<<"Final string: "<<s3<<endl;
}
I need help from you. I try to write the code in C++ which return union of two strings , This is the code, if you know how to write the right code please help me...



