Matrix generation in C++


I have the following code:

for (int w=0; w<10; w++)
{
//some lines of code
unsigned long num = x.to_ulong();
cout << "Decimal form is: " << num << endl;
}
Now what I want is, to make a matrix which will have these values of num, column wise. For example, matrix[i][j], where i is from, let's say "0 to 15", and "j" is from "0 to 15" as well. I want them to put like, matrix[0][0], then matrix[0][1], matrix[0][2] and so on, something like:

for(int i=0; i<=15; i++)
{
for(int j=0; j<=15; j++)
matrix[i][j] = num //here is problem, value of "num" what shall i write instead of it?
}
Some questions, how does num change? or is the same all the time?
unsigned long num = x.to_ulong(); // What is x ?
Topic archived. No new replies allowed.