home *** CD-ROM | disk | FTP | other *** search
- #include "bitvect.h"
- #include <iostream.h>
-
- void display(zBitVector &bv)
- {
- for( int i = 0; i < bv.capacity(); ++i )
- cout << bv.has(i);
- cout << endl;
- }
-
- int
- main( void )
- {
- zBitVectorX c(60), f(35), e(30);
- for( i = 0; i < c.capacity(); ++i )
- if( i & 1 ) c.set(i);
- display(c);
-
- f = c;
- display(f);
-
- e.clear();
- c = e;
- display(c);
-
- for( i = 0; i < f.capacity(); ++i )
- f.reset(i);
- display(f);
-
- return 0;
- }
-