例
注意:我只关心信件.bitset 000001将是a或A.
我有一个string名字s的值"abc".我把每char一个string并通过使用转换为二进制值bitset.
例如
bitset <6> b1 = s[0]; //a
bitset <6> b2 = s[1]; //b
bitset <6> b3 = s[2]; //c
Run Code Online (Sandbox Code Playgroud)
然后我希望把结果放到一个array的strings.阵列的名称是arr(以及每个string的array将代表每一个的二进制值char)
例如
arr[0] //will hold the value of char 'a' in binary form which is 000001
arr[1] //will hold the value of char 'b' in binary form which is …Run Code Online (Sandbox Code Playgroud)