visual studio 2012编译器无法识别stdbool.h

时间:2013-08-03 06:58:41

标签: visual-studio-2012 compilation binary-search-tree header-files stdbool

我正在为二进制搜索树编写头文件,但是当我编译visual studio 2012时,编译器无法识别stdbool.h头文件。我收到此错误:

error C1083: Cannot open include file: 'stdbool.h': No such file or directory   

为什么我会收到此错误?

我尝试使用代码块编译器并仍然遇到同样的错误,我将在下面发布我的文件 提前感谢您的帮助。

/ 二叉搜索树的头文件 /

#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);

0 个答案:

没有答案