Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

a->b what it means

Status
Not open for further replies.

irshadhm

Newbie level 5
Joined
Aug 27, 2011
Messages
9
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
india
Activity points
1,335
a-> b
what it means in embedded c programming,u please xplain me the function of -> symbol
 

a is a pointer to a struct and b is struct's member. It is like saying (*a).b

**broken link removed**
 

pointer a which is pointer to a structure is pointing to structure member b by using operator ->
 

suppose we have a structure as follows;

struct st {
int b;
char c;
float f;
};
struct *a;
a=&st;//assigning the addres of the structure to a
//Now if we want to access a member of the structure, then we can do it as follows
a->b;//(accessing an integer variable b which is a member of the structure st
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top