Hey!
I just wanted to know that if there is any builtin function in c++ that converts a decimal number into binary number??
aminura 0 Light Poster
Recommended Answers
Jump to Post>any builtin function in c++ that converts a decimal number into binary number??
Maybe, depending on what you want to do with it. If all you want is a string, then the bitset<> class is ideal:#include <iostream> #include <bitset> #include <climits> int main() { int dec; …
Jump to Post>how does this 'if statement' work?
It's just a combination of these two statements:std::cin>> dec; if ( cin )
Put simply, if ( cin ) says "Is the stream happy?". Since dec is an integer, if you typed a letter instead of a number, std::cin>>dec would …
All 5 Replies
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
Narue 5,707 Bad Cop Team Colleague
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
aminura 0 Light Poster
Narue 5,707 Bad Cop Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.