0 LIKES LikeUnLike
I'm writing a program in C++ and I need to write a function that looks at all the digits in a long number (integer type, though--maybe 6 digits) and can compare each digit.There are some really sloppy ways to do this with modulus (%) but I'm hoping there's a way to typecast the number as an array of chars, one digit per entry in the array?Do you know how I can look at the digits separately?
Tags:
Report (0) (0) | earlier
Latest activity: earlier. This question has 2 answers.