Like ne555 said, there´s no to_ullong() method available in Bitset Container class.
There is just two different methods to get data out of the container:
to_ulong()
to_string()
All methods can be seen here:
http://www.cplusplus.com/reference/stl/bitset/
to_ulong() is not a proper one for my project because my data container contains 64 bits = 8 bytes which is more than unsigned long - type can handle. Unsigned long - type can take just 4 bytes.
That´s why I decided to use to_string() method. Situation is now this:
bitset<64> dataContainer;
bitset<64> mask;
// during the code the dataContainer is filled with data and mask is generated according to wanted bits
string sData;
string sMask;
sData = dataContainer.to_string();
sMask = mask.to_string();
// When I print the sData and sMask, they contain now:
sData = 000000000000000001101110011001000011001000
0100101100000000000000
sMask = 000000000000000000000000000000000000000000
1111111111000000000000
These values are totally right. So all I have to do is just use AND - operator to mask the data bits and then shift 12 times to right direction to get the wanted value.
Here are the instruction to use bitwise operators by Bitset class:
http://www.cplusplus.com/reference/stl/bitset/operators/
Then I just:
cout << (sData&sMask) << endl;
But I get this error:
error C2784: .... could not deduce template argument for ´const std::bitset<_Bits> & 'from 'std::string' // (four times)
error 2676: .... binary '&' : 'std::string' does not define this operator or a conversion to a type acceptable to the predefined operator
What is this all about? I do everything just like in instructions? Hope someone has experience of this. Thank you from previous help comments!