DekGenius.com
Team LiB   Previous Section   Next Section
volatile qualifier Volatile qualifier

cv-qualifier ::= const | volatile
cv-qualifier-seq ::= const | volatile | const volatile | volatile const

The volatile qualifier can be used with objects and member functions. The volatile qualifier tells the compiler to avoid certain optimizations because the object's value can change in unexpected ways. As a function qualifier, volatile tells the compiler to treat this as a volatile pointer in the member function body.

Example

volatile sig_atomic_t interrupted = false;

See Also

const, const_cast, type, Chapter 2, Chapter 5

    Team LiB   Previous Section   Next Section