Thursday, October 28, 2010

cost volatile

volatile long * const timer = 0x0000ABCD;

It reads as follows: the timer is a const pointer to a long volatile variable. In plain English, it means that the timer is a variable that I will not change; it points to a value that can be changed without the knowledge of the compiler!

So in above case..cost is for "timer " but volatile is for "*timer" (value pointed by timer)...so both r not for same variable

but i cam to know that we can set vloatile and cost for same varibale...i think that also true but i don;t know exact example

No comments:

Post a Comment