#include <iostream>
#include <vector>
std::vector <int> IntToVector(int n) {
std::vector <int> v;
while (true) {
v.insert(v.begin(), n % 10);
n /= 10;
if (n == 0)
return v;
}
}
int main()
{
std::vector <int> v = IntToVector(463912);
for (auto const &element : v)
std::cout << element << " ";
}
/*
run:
4 6 3 9 1 2
*/