Used unsigned int instead of int when converting to base-10
This commit is contained in:
		@@ -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);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user