编译器上的策略数据结构不起作用
Policy data structure on my compiler is not working
我想使用基于策略的数据结构,但我的编译器不断给我错误。
这是我在我的代码中使用的内容:
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
template <typename T> using oset = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
以下是我收到的错误消息:
fatal error:
'ext/typelist.h' file not found
#include <ext/typelist.h>
和
error: function-like macro
'__GLIBC_PREREQ' is not defined
#if __GLIBC_PREREQ(2,15) && defined(_GNU_SOURCE)
我尝试一遍又一遍地替换文件,但它不断告诉我不断添加计算机没有的新文件。我在Mac上使用VS代码。谢谢。
宏__GLIBC_PREREQ在<cstdlib>
中定义,不能保证默认包含。看起来您省略了一些重要的标头,或者这些标头的实现不包括<cstdlib>
PBDS需要gcc,说你使用VSCode IDE并不能告诉你正在使用什么编译器。
相关文章:
- 编译器上的策略数据结构不起作用
- C++结构模板变量快捷方式定义不起作用
- 内部结构初始化不起作用 - C++
- 没有类型结构绑定不起作用?
- 使用选择排序对数组数据结构进行排序,但它不起作用
- cpp / c ++中的grpc客户端代码,元数据x-api-key/x-goog-api-key不起作用,给了我语音A
- 将一个阵列中的数据存储到另外两个阵列中不起作用
- 结构/方法不起作用
- 如果在结构内部使用condition_variable,则它不起作用
- C++覆盖父结构中的数据不起作用
- C++ Eclipse:二叉搜索树节点>数据=变量似乎不起作用
- 尝试读取数据文件,存储在数组中并打印所有元素,但它不起作用
- 将参考类型作为嵌套模板结构中的模板参数作为模板参数不起作用
- 为什么指针>数据有效,而 *double_pointer->data 不起作用?
- 指向结构的指针不起作用
- 模板参数在具有相同数据类型的单个类型名的构造函数中不起作用
- 气泡排序不传递数据或不起作用
- SFML 使用结构发送数据包不起作用
- C++结构不起作用
- 数据结构 - C++指针不起作用