Zzi1ing
Zzi1ing
采纳率0%
2020-05-28 19:43 阅读 64

刚接触c++ 想请教一个问题

merge该怎么调用
#include
#include
using namespace std;
int main(){
vector a;
vector b;
a.push_back(1);
a.push_back(3);
a.push_back(5);
a.push_back(7);
b.push_back(2);
b.push_back(4);
b.push_back(6);
b.push_back(8);
a=merge(b);
sort(a,a+8);
for(i=0;i<8;i++){
cout<<a[i]<<" "<<endl;
}
return 0;
}

15 11 C:\Users\86131\Desktop\向量.cpp [Error] 'merge' was not declared in this scope
16 10 C:\Users\86131\Desktop\向量.cpp [Error] no match for 'operator+' (operand types are 'std::vector' and 'int')

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

1条回答 默认 最新

相关推荐