no viable conversion from returned value of type bankAccount to function return type int
|111|error: invalid operands to binary expression ('bankAccount' and 'int')|
What am I doing wrong?
Thanks
1 2 3 4 5 6 7 8 9 10 11 12 13 14
int bankAccount::searchfor(bankAccount lists[], int length, int acctNum)
{
for(int i = 0; i < length; i++)
{
if(lists[i] == acctNum)
{
return lists[i];
}
elsereturn -1;
}
}