I have these three structures:
typedef uint32_t LINX_SPID;
typedef struct protocolstruct ProtocolStruct;
struct sockaddr_linx sin1,
struct hostent *addr;
typedef struct argstruct ArgStruct;
<lots of other irrelevant declarations>
struct protocolstruct prot;
But, when I run the program, I get the error
and it is pointing to the line in blue.
error: field 'prot' has incomplete type
The only thing that can cause problems in "prot" is
struct sockaddr_linx sin1, sin2;
But, the struct sockaddr_linx has been declared in the same file. Why am I getting this error?