Tuesday, 26 November 2013

OOP344 - Bit Class exercise

For the week of November 26, my OOP344 class was asked to create a Bit class that can do the following:

cout<<Bit<<endl; //output: 0000 1111 0000 1111 ....
cout<<Bit[n]<<endl; //outputs the nth bit value.

We were also asked to create a function that will replace the value of the Bits starting with a given position:
set(char* value, int position)

For the given problems, my solution is posted here: