这是我的代码:
也许我在手册中错过了这个算法……请帮忙 :)
#include <algorithm>
void f() {
int[] a = {1, 2, 3, 4};
int[] b = {1, 2, 100, 101};
// I want to do something like this:
// int* found = compare(a[0], a[3], b[0]);
// in order to get a pointer to a[2]
}
也许我在手册中错过了这个算法……请帮忙 :)
int[] a
?C++代码在哪里?你是指“比较两个向量”还是“比较两个数组”。 - CB Bailey