Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/rest/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ 嵌套的#包含和错误:致命错误:映射:没有这样的文件或目录_C++_Nested_Include_C Preprocessor - Fatal编程技术网

C++ 嵌套的#包含和错误:致命错误:映射:没有这样的文件或目录

C++ 嵌套的#包含和错误:致命错误:映射:没有这样的文件或目录,c++,nested,include,c-preprocessor,C++,Nested,Include,C Preprocessor,我用C/C++编写了一个多文件程序,创建library.h并将所有*.h放在library.h中,然后#包括“library.h”,代码如下: #ifndef LIBRARY_H_ #include "library.h" #endif 我的图书馆在这里: #ifndef LIBRARY_H_ #define LIBRARY_H_ #include <map> #include <fstream> #include <string> #includ

我用C/C++编写了一个多文件程序,创建library.h并将所有*.h放在library.h中,然后#包括“library.h”,代码如下:

#ifndef LIBRARY_H_
    #include "library.h"
#endif
我的图书馆在这里:

#ifndef LIBRARY_H_
#define LIBRARY_H_

#include <map>
#include <fstream>
#include <string>
#include <string.h>
#include <cstdio>
#include <iostream>
#include <ncurses.h>
#include <stdlib.h>
//#include <termios.h>

using namespace std;

#include "structs.h"

#include "globals.h"
#include "typedef.h"


#include "readfile.h"
#include "writefile.h"
#include "tui.h"


#endif /* LIBRARY_H_ */

我如何解决它?

看起来你没有安装C++标准库,或者你的包含路径不包含标准库的包含目录的路径。什么是“C/C++”程序?如果你试图用C编译器编译它,它就必然会出错,<>代码> /COD>。你所包括的其他头文件都是C++。代码>使用命名空间< /C> >(C++)(不应该出现在页眉中)。我使用命名空间行删除,但是我的错误没有区别,只是删除了一些警告。@ MayPaulvavZaDe:你正在编译C++编译器吗?你应该真的显示你的编译命令。
#ifndef TUI_H_
#define TUI_H_
#ifndef LIBRARY_H_
    #include "library.h"
#endif

//#endif    LIBRARY_H_
//BEGIN_C_DECLS
    void print_menu(WINDOW *menu_win, int highlight);
    void menu();
//END_C_DECLS



#endif /* TUI_H_ */