thanks for helping me...
im using c++ language...
how can you convert decimal to binary..
should i divide it? can you give me a hint for what code should i use...thanks
Jump to Post
The same way I showed you in your other thread, only now use an interger as input:
int a = 17; std::cout << std::bitset<CHAR_BIT>( a ) << std::endl;
Will give 00010001 as output (17 binary)
All 11 Replies
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.