DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR CPP
c++ vector decimal to binary
std::string toBinary(int n) { std::string r; while(n!=0) {r=(n%2==0 ?"0":"1")+r; n/=2;} return r; }
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#vector
#decimal
#binary
ADD COMMENT
Topic
COMMENT
Name
8+7 =
Submit