c++ - Binary to Octal -


how write code converters input file of binary numbers octal. had write code converts decimal did, i'm supposed write code converts octal grouping binary numbers in groups of 3 , calling binary decimal function.

for example 10100 grouped 10 | 100. i'd call binary decimal on 10 , 100 , 2 10 , 4 100, place numbers 24, 10100 decimal in octal.

however, cannot figure out how group numbers. (the number type string way). tips thanks.

simply add leading zeroes string if length not divisble 3 group them , convert octal.


Comments

Popular posts from this blog

java - SSE Emitter : Manage timeouts and complete() -

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -