开发者

how can i solve binary system in c++? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can 开发者_如何学Cbe reopened, visit the help center. Closed 12 years ago.

how can i see the answer when i need to solve the decimal code to binary code?


decimal code to binary code? i think that you mean decimal number to binary number, so use std::bitset e.g.

#include <bitset>
...
int i = 49;
std::cout << std::bitset<sizeof(i)*8>(i).to_string() << std::endl;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜