1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
#include <iostream>
using namespace std;
int b [6][6] = {
1, 2, 3, 4, 5, 6, // row 0
1, 2, 3, 4, 0, 0, // row 1
5, 6, 0, 0, 0, 0, // row 2 etc..
1, 2, 0, 0, 0, 0,
3, 4, 5, 6, 0, 0,
1, 3, 5, 0, 0, 0,
};
int main()
{
int S1[6] = { 1, 2, 3, 4, 5, 6 };
//... etc
if (memcmp(b, S1, sizeof(int) * 6) == 0)
cout << "We have a match... ";
else
cout << "We dont have a match..";
return 0;
}
|