I'm trying to compile a simple header with some struct
s but I'm getting this error:
ppal.h:25:34: error: typedef ‘string_proc_func’ is initialized (use decltype instead)
typedef void (*string_proc_func)(string_proc_key*);
There are a bunch of other errors but I think this one is the one causing the others. My header looks like this:
#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;
I looked for similar questions but I can't find how to fix this.