Summation and multiplication of digits of a number
Using std::accumulatewould be more idiomatic. Also use auto whenever possible.

#include &lt;algorithm&gt;
#include &lt;functional&gt; // requires C++14, else use a lambda for the predicate
auto sum = std::accumulate( digits.cbegin(), digits.cend(), 0 );
auto prod = std::accumulate( digits.cbegin(), digits.cend(), 1, std::multiplies&lt;&gt;);




Comment on the accepted answer, which I at first mistook for an edit of the question:


Class names should be nouns, function names should be verbs. As in DigitsCalculator.
Your no argument constructor can be written as CalcDigits = default.
Having a setter and getter for a private variable effective eliminates the encapsulation. There are divergent opinions on this topic. Some say a setter is better, because you can add logic for accessing the variable later. I, personally, have never "added logic" to a setter, and would just make the variable public.
You have an invariant: CalcDigits c; c.SetNumber(42); c.GetSum(); c.GetMul();. Interfaces should be "easy to use correctly, difficult to use incorrectly.
Overall, I like the new look better. You have separation of concerns (command line communication and actual calculation). You also have an encapsulated object, that you can pass around with clear intent.