Just for your benefit of knowing the proper syntax
Your code:
That function is fine.Code:float is_empty(stack_type* stk)
{
if ( (*stk).top == -1 )
return TRUE;
else
return FALSE;
}
Altered code:
Which does the same job, but may be a little easier on the reader. Plus its easier to type out as well.Code:float is_empty(stack_type* stk)
{
if ( stk->top == -1 )
return TRUE;
else
return FALSE;
}