But I need to separate the each digit of a double variable how I can do this?
A floating-point representations is inexact; so very often you can compute a more accurate result of an operation on real numbers in your head than your computer can do with floating-point numbers. When it comes to 'each digit of a double variable' (where by 'digit' you mean 'decimal digit'), things get even murkier. The floating-point representation of a real number typically uses a radix of 2; though the external representation is decimal (to base 10). We expect 0.01 to be exactly representable; the digits are 0, 0, and 1 followed by zeroes. However 0.01 may not be exactly representable (in limited memory) using a binary radix.
With those caveats in place, write out the double value (to the precision that you require) to a std::ostringstream and pick off the digits from the characters in the std::string.