Help Converting from C++
rookie
rookie at rooki.com
Sun Jul 29 10:43:58 PDT 2012
I have the following code.
Heavily cutdown.
How would I do the same thing in D?
//////////////////////////////
class NInfo
{
public:
Stack<int> info;
}
int cols = 5;
int rows = 10;
ninfo = new NInfo*[cols+2];
int r;
for (r=0; r<cols+1; r++)
{
ninfo[r]=new NInfo[rows+2];
for (int c=0; c<rows+1; c++)
{
ninfo[r][c].info.push(r);
ninfo[r][c].info.push(c);
}
}
Rookie
More information about the Digitalmars-d-learn
mailing list