From f840ff9c002dd61cf7c31d996232656e32b30feb Mon Sep 17 00:00:00 2001 From: Rockingcool Date: Sun, 10 Mar 2024 21:57:58 -0500 Subject: [PATCH] Updated comment explaining function --- numeric_base.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/numeric_base.cpp b/numeric_base.cpp index 4850588..d56f7c5 100644 --- a/numeric_base.cpp +++ b/numeric_base.cpp @@ -13,7 +13,7 @@ unsigned int to_decimal(std::string num, int from_base) { /* Here, we convert 'num' to decimal (base 10) - Find the index of every character in the string, in 'possible_chars' and - compute the value using */ + compute the value using the position of the character in the number. */ for (int i=0; i < (int)num.length(); i++) { current_char = num.at(i); index = possible_chars.find(toupper(current_char)); // Convert the character to upper-case, so that the earliest match is detected