I have just learnt C++ for a very short time, and in an assignment 
I am trying to find a particular target in a 2-dimensional array as follows:

```
bool simsearch(int array[22][22], int target, int n){
    bool result = 0;
    for (int a = 1; a < n + 1; a++){
        for (int b = 1; b < n + 1; b++){
            if (array[a][b] == target)
                result = 1;
                break;
        }
    }
    return result;
}

```

and use it like:

```
if(simsearch(substitute, 6, size) == 0){
        cout << "**Warning**" << '\n';
    }

```

But, the warning output is always there even if the target is in the array.
What is the underlying problem in the code?

Thanks!