Hi all!
I have these structs declared:
And this function:
But I can't do that:
loadwave(tmpbyte, (s_sound *)defperso[id].son);
Gcc returns this:
error: cannot convert to a pointer type
I feel very stupid right now, must be missing something quite obvious. Thanks for any help
I have these structs declared:
Code:
typedef struct {
int length;
unsigned short *sound;
} s_sound;
typedef struct {
short poids, nsauts;
char name[32];
short idcoups, idphoto, idicone;
//
s_sound son[32];
short nsons;
char pakname[16];
short idpak;
short required;
} s_defperso;
And this function:
Code:
int loadwave(const char *name, s_sound *son);
But I can't do that:
loadwave(tmpbyte, (s_sound *)defperso[id].son);
Gcc returns this:
error: cannot convert to a pointer type
I feel very stupid right now, must be missing something quite obvious. Thanks for any help