Mail Archives: djgpp/1999/02/17/15:43:28
BTW, this (ugh) macro (yuck, bleah) will return the size of an array:
#define size_of_array(a) (sizeof(a)/sizeof((a)[0]))
then you use size_of_array(my_array).
Also, you may want to avoid ugliness with arrays and macros by switching to
C++. The Standard Library vector realloc()s itself as needed and has a
member function size().
--
.*. "Clouds are not spheres, mountains are not cones, coastlines are not
-() < circles, and bark is not smooth, nor does lightning travel in a
`*' straight line." -------------------------------------------------
-- B. Mandelbrot |http://surf.to/pgd.net
_____________________ ____|________ Paul Derbyshire pderbysh AT usa DOT net
Programmer & Humanist|ICQ: 10423848|
- Raw text -