   getting nr of rows and cols from a dynamic array.
  Is it possible to get the nr of rows and cols from a dynamicaly created 2d array?I have a function that takes an arraypointer,myfunc(double arraypointer**), and within this function i want to know the nr of rows and cols so that I modify the right things.[edited by - KH on February 6, 2004 6:17:05 AM]
  well, your array** points to some type of object like an int or a char or a Thingamajig*, right? The thing itself doesn''t need to know where it is, just that it is.The other stupid anser would be "use vectors." then you can just call size() and get the answer.  ;  There''s no built-in way to do this. One solution would be to add two function params that indicate the number of rows and columns. Another is to create a structure that contains the array and the number of rows/columns, then pass a pointer to that as the function param. ;  maybeint array[12][23];int iNumRows= sizeof(array[0]) / (array[0][0]);int iNumElements = sizeof(array)    / (array[0][0]);int iNumColumns  = iNumElements / iNumRows;.... just maybe.... ;  problem is, inside his function all he has is a pointer and sizeof will return the size of the pointer. 