diff --git a/Source/Problem30.cpp b/Source/Problem30.cpp index fd7bdf6..3fc3a5e 100644 --- a/Source/Problem30.cpp +++ b/Source/Problem30.cpp @@ -40,7 +40,7 @@ std::vector Problem30::getDigits(uint64_t num){ //The easiest way to get the individual digits of a number is by converting it to a string std::string digits = std::to_string(num); //Holds a string representation of num //Start with the first digit, convert it to an integer, store it in the vector, and move to the next digit - for(int cnt = 0;cnt < digits.size();++cnt){ + for(unsigned int cnt = 0;cnt < digits.size();++cnt){ listOfDigits.push_back(std::stoi(digits.substr(cnt, 1))); } //Return the list of digits