小编man*_*ani的帖子

将数组转换为向量

将int数组转换为vector的最简单方法是什么?并使用if语句.

int num1[4] = {2, 4, 1, 8};
int num2[4] = {2, 4, 6, 8};

if (testNUM(num1, num2, 4))
  cout << "ERROR: num1 and num2 are reported to be the same.\n";
  else
  cout << "SUCCESS: num1 and num2 are correctly identified "
  << "as different.\n";
Run Code Online (Sandbox Code Playgroud)

testNUM被声明为函数原型(BOOL).

谢谢,

c++ arrays vector

0
推荐指数
1
解决办法
1万
查看次数

标签 统计

arrays ×1

c++ ×1

vector ×1