#include <iostream> #include <bitset> using namespace std; int main() { int a= 234; int b; b = bitset<8>(a).to_string(); cout << b; return 0; }
Standard input is empty
prog.cpp: In function 'int main()': prog.cpp:8:4: error: cannot convert 'std::basic_string<char>' to 'int' in assignment b = bitset<8>(a).to_string(); ^
Standard output is empty