Can a bool variable store more than 0x01?

后端 未结 6 1129
慢半拍i
慢半拍i 2021-01-21 09:48
#include 
#include 

using namespace std;

int main()
{
    bool a = 0x03;
    bitset<8> x(a);
    cout<

        
6条回答
  •  北荒
    北荒 (楼主)
    2021-01-21 10:11

    Why would you even think you could? It's like saying int i = "abc";.

提交回复
热议问题