Used unsigned int instead of int when converting to base-10

This commit is contained in:
2024-03-01 07:21:03 -06:00
parent 24c1dd6391
commit 2c735896df
2 changed files with 6 additions and 6 deletions

View File

@@ -3,10 +3,10 @@
#include <string>
/* Convert the given value from the given base, to base 10 */
int to_decimal(std::string num, int from_base);
unsigned int to_decimal(std::string num, int from_base);
/* Convert the given value from base 10 to the given base */
std::string from_decimal(int num, int to_base);
std::string from_decimal(unsigned int num, int to_base);
/* Convert the given value from 'from_base', to 'to_base' */
std::string base_convert(std::string num, int from_base, int to_base);