I'm writing a header file for binary search tree, however when i compiled visual studio 2012 compiler does not recognized stdbool.h header.I got this error:
error C1083: Cannot open include file: 'stdbool.h': No such file or directory
why am i getting this error ?
I tried it with the code block compiler and still got the same error, I'll post my file below Thank you in advance for helping.
/Header file for binary search tree/
#include <stdio.h>
#include <stdbool.h>
// Structure Declarations
typedef struct
{
void* dataPtr;
struct node* left;
struct node* right;
}NODE;
typedef struct
{
int count;
int (*compare) (void* argu1, void* argu2);
NODE* root;
}BST_TREE;
// Prototype declarations
BST_TREE* BST_Create
(int (*compare) (void* argu1, void* agu2));
BST_TREE* BST_Destroy (BST_TREE* tree);
bool BST_Insert (BST_TREE* tree, void* dataPtr);
bool BST_Delete (BST_TREE* tree, void* dltKey);
void* BST_Retrieve (BST_TREE* tree, void* dataPtr);
void* BST_Traverse (BST_TREE* tree,
void (*process) (void* dataPtr));
bool BST_Empty (BST_TREE* tree);
bool BST_Full (BST_TREE* tree);
int BST_Count (BST_TREE* tree);
static NODE* _insert
(BST_TREE* tree, NODE* root,
NODE* newPtr);
static NODE* _delete
(BST_TREE* tree, NODE* root,
void* dataPtr, bool* success);
static NODE* _retrieve
(BST_TREE* tree,
void* dataPtr, NODE* root);
static NODE* _traverse
(NODE* root,
void (*process) (void* dataPtr));
static NODE* _destroy ( NODE* root);