what does the '->' in 'pid->iState' mean?


hi~ i've seen operator (?) in fair amount of c code have looked @ can't figure out means:

code: [select]
pid->istate

(context below)


code: [select]
pid->istate += error;
if (pid->istate > pid->imax)
pid->istate =
pid->imax;
else if (pid->istate

hi roy,

pid pointer structure , pid->istate reference member of structure called istate.

elsewhere in code definition of structure pid points to, there lots of ways like:

struct {
  int istate;
  int imax;
  // other elements....
} id, *pid;  // id structure, pid pointer structure

when code accesses structure directly, can this:
 id.istate = 1;
 
when has pointer structure, this:
 pid->istate = 1;

both change value of istate in id structure 1


Arduino Forum > Forum 2005-2010 (read only) > Software > Syntax & Programs > what does  the '->' in 'pid->iState' mean?


arduino

Comments

Popular posts from this blog

CAN'T INSTALL MAMBELFISH 1.5 FROM DIRECTORY - Joomla! Forum - community, help and support

error: expected initializer before 'void'

CPU load monitoring using GPIO and leds - Raspberry Pi Forums