STL bitmap 使用

/*
description:
STL  bitmap的使用

author:Jason
date:20160521
*/
#include
#include 
#include
using namespace std;


int main()
{
    bitset<100>  mybitset;

    mybitset.set();//将所有位置为1
    cout<set(2,0)<if(mybitset.test(1))
    {
        cout<<"bit 1 is 1"<else
    {
        cout<<"bit 1 is 0"<cout<//翻转



    return 0;

}

你可能感兴趣的:(stl,bitmap,位图,算法)