|
From: Ioannis V. <no...@ho...> - 2002-07-31 14:53:15
|
> -----Original Message----- > From: Ramana Kumar [mailto:ra...@my...] > Sent: Wednesday, July 31, 2002 2:19 PM > To: Ioannis Vranos; C++ > Subject: RE: [Dev-C++] sizeof array > > > thanks ioannis, i have briefly read your reply and it is what > i had feared. > is there any way to implement what i had before so that the > sizeof operator > reports the size as if it were a local array? for example, > can i pass the > array to the function by reference or dereference the pointer that is > passed? No there is no way for a built in array. The only thing you can do, is pass an additional argument, the size of the array in the style void f(char *s[], const unsigned long SIZE); Or better, use some standard library container, such as vector. Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.cjb.net * Alternative URL: http://run.to/noicys |