C++bitset

#include <iostream>
#include <bitset>

using namespace std;//标准命名空间

#define ARY_SIZE 10

int main()
{

bitset<5>b;
for (int i = 0; i < b.size(); ++i)
{
cout << b[i] << " " ;
}
cout << endl;
char chs[5];
memset(chs,'a', 5);
for (int i = 0; i < 5; ++i)
{
cout << chs[i] << " ";
}
int wait;
cin >> wait;

return 0;
}

posted @ 2013-07-20 13:26  Predator  阅读(209)  评论(0编辑  收藏  举报