Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <locale>
- #include "Set.h"
- #include "TSet.h"
- using namespace std;
- int main() {
- TBitField A(115);
- TBitField B(115);
- TBitField res;
- TBitField res1;
- TBitField res2;
- B.Add(19, 115);
- B.Add(12, 115);
- B.Add(32, 115);
- B.Add(57, 115);
- A.Add(12, 115);
- A.Add(32, 115);
- TBitField C(B);
- C.del(19, 115);
- cout << A.TBitField_to_String(115) << endl;
- cout << B.TBitField_to_String(115) << endl;
- cout << C.TBitField_to_String(115) << endl;
- C = A;
- cout << C.TBitField_to_String(115) << endl;
- res = A & B;
- cout << res.TBitField_to_String(115) << endl;
- res1 = A | B;
- cout << res1.TBitField_to_String(115) << endl;
- res2 = ~A;
- cout << res2.TBitField_to_String(115) << endl;
- cout << "-----------------------------------------------" << endl;
- TSet V(115);
- TSet N(115);
- N.Add(56);
- N.Add(34);
- N.Add(21);
- N.Add(8);
- V.Add(34);
- V.Add(78);
- cout << (V & N).TSet_to_String() << endl;
- cout << (V | N).TSet_to_String() << endl;
- cout << (~N).TSet_to_String() << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment