Subj : Re: help on silly code To : borland.public.cpp.borlandcpp From : Leo Siefert Date : Wed Sep 08 2004 10:17 am On Wed, 8 Sep 2004 07:57:22 -0400, "Abilio Marques" wrote: >typedef struct { > int sizeX; > int sizeY; > double *data; >} fSet; >... >fStet b = {2,2, > {3,4, > 5,6}}; {3,4,5,6} is not a double*. It is an int[4]. >typedef struct { > int sizeX; > int sizeY; > char *data; >} fSet; > >fStet b = {2,2,"hello"}; "hello" is a const char*. Strictly it should not be allowable unless the struct contains a const char* member, but many compilers still allow it a legacy code. This use is deprecated. BC5, however is a pre-standard compiler and will accept this without comment. Now, back to your problem. How would you expect the compiler/the other program code to know how to process the array you wish to include in fSet? A char* is terminated by a '\0' byte, so "hello" is actually a const char[6], and when some function is processing it, the function can always determine the last character by looking for the '\0'. What do you intend to pass as your data? Always 4 doubles? If so you can use: double data[4]; otherwise you will need to include a member to indicate the number of doubles in the array and you will need to new[] and delete[] the actual array. - Leo .