L
Li Zhou
Hello, i need help fix this compile error
error: expected declaration specifiers or '...' before 'Value'
where Value is defined in another header, say "a.h"
in "a.h"
-------------------------------------------
typedef struct {
int type;
ssize_t size;
char* data;
} Value;
-------------------------------------------
in "b.h"
-------------------------------------------
#include "a.h"
int applypatch(const char* source_filename,
const char* target_filename,
const char* target_sha1_str,
size_t target_size,
int num_patches,
char** const patch_sha1_str,
Value** patch_data);
-------------------------------------------
the compile error occurs at b.h saying
error: expected declaration specifiers or '...' before 'Value'
but Value is already defined by the typedef clause in a.h, so what is
the problem here and how do i fix this?
Regards,
error: expected declaration specifiers or '...' before 'Value'
where Value is defined in another header, say "a.h"
in "a.h"
-------------------------------------------
typedef struct {
int type;
ssize_t size;
char* data;
} Value;
-------------------------------------------
in "b.h"
-------------------------------------------
#include "a.h"
int applypatch(const char* source_filename,
const char* target_filename,
const char* target_sha1_str,
size_t target_size,
int num_patches,
char** const patch_sha1_str,
Value** patch_data);
-------------------------------------------
the compile error occurs at b.h saying
error: expected declaration specifiers or '...' before 'Value'
but Value is already defined by the typedef clause in a.h, so what is
the problem here and how do i fix this?
Regards,