topical media & game development 
  
 
 
 
 
  
    
    
  
professional-program-21-BitsetBasics-BitwiseOperators.c
? / 
professional-program-21-BitsetBasics-BitwiseOperators.c
  include <bitset>
  include <iostream>
  using namespace std;
  
  int main(int argc, char** argv)
  {
    string str1 = "0011001100";
    string str2 = "0000111100";
    bitset<10> bitsOne(str1), bitsTwo(str2);
  
    bitset<10> bitsThree = bitsOne & bitsTwo;
    cout << bitsThree << endl;
    bitsThree <<= 4;
    cout << bitsThree << endl;
  
    return (0);
  }
  
  
  
(C) Æliens 
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher. 
In case of other copyright issues, contact the author.