c++ - How to print binary for each address using Qt -


i have problem displaying every bits in qt. example, receive binary number 10011101. therefore want display this:

address 0 = 1
address 1 = 0
address 2 = 0
address 3 = 1
address 4 = 1
address 5 = 1
address 6 = 0
address 7 = 1

i know how using c , of course different when using qt.

if binary representation string:

qstring s = "10011101"; 

if binary representation int:

int val = 10011101; qstring s = qstring("%1").arg(val); 

print it:

// address ... = ... for(int i=0; i<s.length(); i++)     cout << "address " << << " = " << s.at(i).tolatin1() << endl; 

Comments

Popular posts from this blog

python - Selenium remoteWebDriver (& SauceLabs) Firefox moseMoveTo action exception -

html - How to custom Bootstrap grid height? -

transpose - Maple isnt executing function but prints function term -