Im pretty new on STL-programming. For the moment Im playing around with bit-operators.
The problem is that I'm trying to use a function called to_string() that should return a 'bitpattern' in format of string, but it isn;t workinnggg.
When I try compile this code a get an error like "no matching function for call to bitset<4, long unsigned int>::tostring()"Code:#include <iostream.h> #include <bitset> #include <string> int main() { int value = 2: bitset <4> b = value; string bitpattern = b.to_string(): cout << "BitString: " << bitpattern << endl: }
Thx in advance



LinkBack URL
About LinkBacks


