I am trying to find a way to find the length of an integer (the number of digits), and then put it in an integer array. The assignment also requires you to do this without using classes from STL, although the program specification says that we can use the “common C libraries” (ask my professor if I can use cmath because I assume log10 (num) + 1 is the easiest way, but I was wondering if there is another way).
Ah, and this should not handle negative numbers. Extremely non-negative numbers.
I am trying to create a variant of "MyInt" that can handle a wider range of values using a dynamic array. Any advice would be appreciated! Thanks!
c ++ integer numbers count digits
user1888527
source share