M
mathieu
Hi there,
I must be doing something wrong, but I do not understand the
documentation for bitset( string ), shouldn't this be equivalent (ref
== mask ) ?
#include <bitset>
#include <iostream>
#include <string>
int main()
{
std::bitset<8> ref( 13ul );
std::cout << ref << std::endl;
const char v[] = "1101";
std::bitset<8> mask( std::string(v) );
std::cout << mask << std::endl;
return 0;
}
Thanks
-Mathieu
I must be doing something wrong, but I do not understand the
documentation for bitset( string ), shouldn't this be equivalent (ref
== mask ) ?
#include <bitset>
#include <iostream>
#include <string>
int main()
{
std::bitset<8> ref( 13ul );
std::cout << ref << std::endl;
const char v[] = "1101";
std::bitset<8> mask( std::string(v) );
std::cout << mask << std::endl;
return 0;
}
Thanks
-Mathieu