Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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.

Latest threads

Back
Top