int 배열을 벡터로 변환하는 가장 간단한 방법은 무엇입니까? 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";
testNUM은 기능 프로토 타입 (BOOL)로 선언된다.
감사
'testNUM'을 정의하십시오 –
'num1'과'num2'는 둘 다 배열입니다. 벡터로 변환해야하는 이유는 무엇입니까? – azz