将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).
谢谢,