C/C++中volatile关键字详解

 1. 为何用volatile?html     C/C++ 中的 volatile 关键字和 const 对应,用来修饰变量,一般用于创建语言级别的 memory barrier。这是 BS 在 "The C++ Programming Language" 对 volatile 修饰词的说明:安全 A volatile specifier is a hint to a compiler that
相关文章
相关标签/搜索