hello everybody!
i have given a question in which i was not allowed to use built-in 2d arrays of C++. I have to define my own class of 2d array in which both rows and columns were dynamically allocated. The hint given wast that "think in term of array of arrays".
m doing something like this

array=new int *[rows];

for(int i=0;i<rows;i++)
array=new int [cols];

does m doing right??

thnx:)

Looks ok so far.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.