编一程序,将两个字符串(都不含空格)连接起来。 输入描述: 共两行,第一行为字符串a,第二行为字符b,a和b的长度均不超过100。 输出描述: 一行,字符串a和字符串b连接后的新字符串。 这题直接运用string头文件中自带的append,可直接将两个字符串拼接起来。#include #include #include #include using namespace std; int main() {

string a;
string b;
cin>>a>>b;
cout<<a.append(b);
return 0;

}