[Solved] Linux gcc Compile Error: unknown type name ‘bool‘

Error description

error: unknown type name ‘bool’; did you mean ‘_Bool’?

Cause of error
Unknown type name: ‘bool’, because the boolean type is not defined in the C standard (C89), so it will report an error. C99 provides a header file that defines bool, true for 1 and false for 0. Just import stdbool.h and you can manipulate boolean types very easily.

Solution:

//add the header file 
#include <stdbool.h>

Read More: