   size of a double* array.
  Okay, so i have this structure that has a member that is of type double* something like:typedef struct { double *myVals;} tStruct;then i have:tStruct theStructure;I want to find out what the size of theStructure->myVals; is....i dont think standard sizeof(blah) is working... This is beecause the double* is an array of values set somewhere else by a dll i have.  So any other ways to find out how many "elements" are in therE?i tried:sz=(sizeof(theStructure->myVals) / sizeof(theStructure->myVals[0]));andI cant tell if this is the correct way or not.Any ideas? Thanks-Shane[edited by - Codejoy on August 4, 2003 1:55:49 PM]
  You have to track the size of dynamically allocated data yourself in C++try something like that:typedef struct {double *myVals;unsigned int numVals;} tStruct; ;#define ARRAY_SIZE 10struct foo{    double* bar;}struct foo* glob_o_foo =   (struct foo*)malloc( sizeof( struct foo ) * ARRAY_SIZE )sizeof(double*) is likely to be 4 bytes (unless you''re on a 64 bit OS/CPU), just like any other pointer.Of course, if ll you''re holding is a double, their is no reason for the structure...double* foo = (double*)malloc( sizeof(double)*ARRAY_SIZE )    Tony 