c - Invalid Declaration Syntax in a struct -
c - Invalid Declaration Syntax in a struct -
i'm working in c , getting next error:
*** error c074 in line 78 of ..\..\..\libraries\mchpstack_base\arp.c : invalid declaration syntax
the relevant portion of code is:
typedef struct _arp_packet { word hardwaretype; word protocol; byte macaddrlen; byte protocollen; word operation; mac_addr2 sendermacaddr; ip_addr senderipaddr; mac_addr2 targetmacaddr; // line 78 ip_addr targetipaddr; } arp_packet;
now mac_addr2 define elsewhere in header file sure included in arp.c:
typedef struct _mac_addr2 { byte v[6]; } mac_addr2;
i'm new c; read on guides on creating structs, typedef usage, , namespace issue within c. i'm quite stuck. error telling me?
c struct typedef
Comments
Post a Comment