Convert a number from Base B1 to Base B2 without using any intermediate base

后端 未结 7 1614
执笔经年
执笔经年 2021-02-02 15:47

Is there a way Convert a number from Base B1 to Base B2 without using any intermediate base.

Ex:

214 from base 5 to base 16 without converting it first to decima

7条回答
  •  后悔当初
    2021-02-02 16:30

    Store them as int and then convert when you need to represent them like std::ios_base does.

提交回复
热议问题