Skip to content
On this page

CPP_布尔值


标签:CPP/基础  
  1. 有两个值: true(1), false(0)
  2. 默认使用数字表示真假,加上关键字 boolalpha,之后则都是单词表示
  3. true, false 属于关键字,不允许作为标识符使用
  4. 默认占用 1 字节,实际上 1 比特就够了

Last updated: