Search code examples
c++borland-c++

Declaration Syntax Error for a function bool f(bool* b) in Borland C++


I am trying to create this function in Borland C++ v3.1 but it gives me the error "Declaration Syntax Error". Can anyone help me with this error?

bool f(bool* b)
{

}

Solution

  • Put this at the top of your source file. If it works after that, then Borland c++ simply doesn't support bool type. If not, I have no clue why you get Syntax error.

    typdef byte bool;
    #define true 1
    #define false 0