typedef void汇编误差(是初始化的(使用dectType))
typedef void compilation error (is initialized (use decltype instead))
我正在尝试使用一些struct
s编译简单的标头,但我遇到了此错误:
ppal.h:25:34: error: typedef ‘string_proc_func’ is initialized (use decltype instead)
typedef void (*string_proc_func)(string_proc_key*);
还有很多其他错误,但我认为这是导致其他错误的错误。我的标题看起来像这样:
#include <stdint.h>
using namespace std;
typedef struct string_proc_list_t
{
char* name;
struct string_proc_node_t* first;
struct string_proc_node_t* last;
} __attribute__((__packed__)) string_proc_list;
typedef struct string_proc_node_t
{
struct string_proc_node_t* next;
struct string_proc_node_t* previous;
string_proc_func f;
string_proc_func g;
string_proc_func_type type;
} __attribute__((__packed__)) string_proc_node;
typedef void (*string_proc_func)(string_proc_key*);
typedef enum string_proc_func_type_t
{
REVERSIBLE = 0,
IRREVERSIBLE = 1
} __attribute__((__packed__)) string_proc_func_type;
typedef struct string_proc_key_t
{
uint32_t length;
char* value;
} __attribute__((__packed__)) string_proc_key;
我寻找类似的问题,但找不到解决方法。
您要在声明之前尝试使用string_proc_key
。
在typedef struct ... string_proc_key;
相关文章:
- 是否可以初始化不可复制类型的成员变量(或基类)
- C++使用整数的压缩数组初始化对象
- C++初始化基类
- 多成员Constexpr结构初始化
- 复制列表初始化的隐式转换的等级是多少
- 内联映射初始化的动态atexit析构函数崩溃
- 如何在C++中初始化嵌套类中的2个memeber
- 如何声明特征矩阵,然后通过嵌套循环初始化它
- 没有用于初始化C++中的变量模板的匹配构造函数
- 在未初始化映射的情况下,将值插入到映射的映射中
- C++成员初始化
- 为什么在C++中首先初始化成员类
- 同时具有"聚合初始化"和"模板推导"
- 初始化具有非默认构造函数的std::数组项的更好方法
- 是否可以在编译时初始化数组,以便在运行时不会花费时间?
- 我可以使用条件运算符初始化C风格的字符串文字吗
- 在C和C++中初始化结构中的数组
- 标准是否使用多余的大括号(例如 T{{{10}}})定义列表初始化?
- 在函数内部的声明中初始化数组,并在外部使用它
- typedef void汇编误差(是初始化的(使用dectType))