就四行代码,运行不起来,求助
int main()
{
const char *str="hello world!";
bitset<32> x(str);
for(size_t i=0;i<x.size();i++)
cout<<x[i];
#include <bitset>
#include <iostream>
using namespace std;
int main(void)
{
const char *str="hello world!";
bitset<32> x(str);
for(size_t i=0;i<x.size();i++)
cout<<x[i];
return 0;
}
#include <iostream>
#include <bitset>
using namespace std;
bitset<32> x((std::string)str);
const char *str="hello world!";
bitset<32> x(str);
const char *str="100110111010";
bitset<32> x(str);