1.在下标为n处插入y
#include <iostream>
#include <algorithm>
#include <string>
using namespace std;string x,y;
int n;int main()
{cin>>x>>y>>n;x.insert(n,y); //在下表为n处插入ycout<<x<<endl;return 0;
}

2…待续
深耕网站建设、视觉设计与SEO优化的一线实战洞察。
1.在下标为n处插入y
#include <iostream>
#include <algorithm>
#include <string>
using namespace std;string x,y;
int n;int main()
{cin>>x>>y>>n;x.insert(n,y); //在下表为n处插入ycout<<x<<endl;return 0;
}

2…待续