S
Sheldon
Hi,
I have a function defined in the netcdf library as :
int nc_put_att_short (int ncid, int varid, const char *name,
nc_type xtype, size_t len, const short *sp);
Where the 5th argument is a pointer to short constant variable. In my
case this variable is a rather large array.
When I created and initialized the array I had to assign data to the
array before calling the function above.
How can I make my array match what this function is asking for, i.e. a
const short pointer?
I have several arrays to write so I store them in a struct. So my
pointer is of type: struct data *ptr and I have to then call the
above function to write the data.
My question is how do I make ptr->array a variable of type const short
*sp?
Any help is greatly appreciated!
/Marston
I have a function defined in the netcdf library as :
int nc_put_att_short (int ncid, int varid, const char *name,
nc_type xtype, size_t len, const short *sp);
Where the 5th argument is a pointer to short constant variable. In my
case this variable is a rather large array.
When I created and initialized the array I had to assign data to the
array before calling the function above.
How can I make my array match what this function is asking for, i.e. a
const short pointer?
I have several arrays to write so I store them in a struct. So my
pointer is of type: struct data *ptr and I have to then call the
above function to write the data.
My question is how do I make ptr->array a variable of type const short
*sp?
Any help is greatly appreciated!
/Marston