This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Accessing structure pointer members

Hi all,
For some reason, I cannot access the structure members if I use struct pointers.

eg:

typedef struct
{ int member1;
}structure_t;

structure_t structure, *structure_ptr;

int main()
{ sturcture.member1 = 4; //works structure_ptr -> member1 = 4; //does not work

return 0;
}

I am using KEIL MDK 5.23 with TM4C123GH6PM. I am using the debugger to see if the member values are changed or not.

What am I missing?

Thanks,
EE