That is (
00123 04567 000012
) not a number. In
computational sense a number cannot have
0
s in the front (Try inserting
001
into a calculator).
So that is a sequence of digits (In a fixed length I suppose). You cannot treat it as a number but you can treat it as an array of digits. I suppose you want to store a multiple number of these sequences. So do it this way :
const size_t length = 16;
int* numbersArray[10]; size_t numUsed = 0;
int one[length] = {0,0,0,0,2,3,4,5,6,7,8,9,0,1,2,4};
int two[length] = {0,0,5,6,7,8,3,2,1,6,3,4,5,3,2,7};
int three[length] = {0,2,3,5,3,5,6,7,3,2,6,3,5,3,5,3};
numbersArray[0] = one;
numbersArray[1] = two;
numbersArray[2] = three;
numUsed = 3;
int* current;
for(int i=0; i < numUsed; i++)
{
current = numbersArray[i];
for(int j=0; j < length; j++)
{
std::cout << current[j];
}
std::cout << endl;
}
It gets somewhat complicated if your "numbers" are not in a fixed length. Anyway, I hope you got what you wanted !