Galactix There is no canonical way of defining dynamic 2D arrays in C or C++, so you'll have to describe first what type of object you are dealing with. Is it an array of pointers to arrays? Can you post the struct/class definition plus the code that allocates one of these things?
Chances are the information on the length of each row has to be stored separately. I believe your division will get you the size of a pointer divided by the size of an int (which is often 1).