i cannot understand a part of this simple structure!!!!

Status
Not open for further replies.

absfast123

New Member
here is a structure in microchip tcp stack file "StackTsk.h"
typedef struct _MAC_ADDR
{
BYTE v[6];
}MAC_ADDR;

what is the purpose of red area _MAC_ADDR . normally we have to create instance using
MAC_ADDR RemoteMac;
then y author used above red text.
Thanks in Advance.
AB Sami.
 
The structure type is _MAC_ADDR

the MAC_ADDR is an instance of it.

he could have used

Code:
typedef struct [B][COLOR=Red]_MAC_ADDR[/COLOR][/B]
{
         BYTE v[6];
};

_MAC_ADDR MAC_ADDR;

by giving the structure type a name he can create other instances of it as needed elsewhere in the program.
 
Last edited:
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…