-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
48 lines (35 loc) · 967 Bytes
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
* File: main.cpp
* Author: Dhavalkumar Suthar
*
* Created on October 4, 2015, 2:07 PM
*/
#include <cstdlib>
#include "BitSetter.h"
#include <iostream>
using namespace std;
/*
* This program tests the BitSetter class' functionality.
*/
int main(int argc, char** argv) {
//Allocate a new object of bitsetter...
BitSetter x;
//Set our numbers...
x.setNumberOne(150);
x.setNumberTwo(20);
//Print the bits so that we can see what's going on...
cout<<"Number 1:";
x.printBits(x.getNumberOne());
cout<<"Number 2:";
x.printBits(x.getNumberTwo());
//Define our starting and ending points...
x.setStartingPoint(3);
x.setEndingPoint(7);
//Apply the changes...
x.setBits();
//And print the result...
cout<<"Done applying bits.\n";
cout<<"Number 1:";
x.printBits(x.getNumberOne());
return 0;
}