Consider a function that returns a bool
array. In the call statement of this function, how do you store the bool array in another bool array?
I can not figure out the syntax. For example, consider this function
void checkoutput(vector<vector<int>>& A, bool op[])
{
int i;
int n = A.size();
bool actualop[n];
actualop = checkiftriangleexists(A);
for (i = 0; i < n; i++)
{
if (actualop[i] == op[i])
{
cout << "Pass" << endl;
}
else cout << "Fail" << endl;
}
}
This function calls checkiftriangleexists(A)
that returns a bool array. I want to store this into another bool array called actualop[]
.
Please help me figure out where I am going wrong.