void isSmallInBig()
{
const int n = 4;
int big[n][n] = { {11,12,13,14}, {21,22,23,24}, {31,32,33,34}, {41,42,43,44} };
const int m = 3;
int small[m][m] = { {21,22,23}, {31,32,33}, {41,42,43} };
bool matchFound = false;
bool flag = true;
for(int r=0; r<n-m+1; r++)
{
for(int c=0; c<n-m+1; c++)
{
flag = true;
for(int temp_r=0; temp_r<m; temp_r++)
{
for(int temp_c=0; temp_c<m; temp_c++)
{
if(big[r + temp_r][c + temp_c] != small[temp_r][temp_c])
{
flag = false;
break;
}
}
if(flag==false) break;
}
if(flag==true)
{
matchFound = true;
break;
}
}
if(flag==true) break;
}
if( matchFound )
cout<<"Match found";
else
cout<<"Match not found";
}