Mail Archives: djgpp/1998/09/08/16:31:50
Endlisnis wrote:
> You do have to malloc the required space, but if you want to
> return a struct,
> then just do it!
Note that passing structures by value, rather than by reference (either
through pointers or C++ references) means that the entire struct is
being pushed onto and popped off of the stack. This can be very
expensive, and potentially damaging, if all of a structure's members
(such as pointers to data, etc.) aren't self-contained; you can get
situations where you have two structure's with inconsistent states using
overlapping memory that are not taking into account the other.
--
Erik Max Francis / email max AT alcyone DOT com / whois mf303 / icq 16063900
Alcyone Systems / irc maxxon (efnet) / finger max AT sade DOT alcyone DOT com
San Jose, CA / languages En, Eo / web http://www.alcyone.com/max/
USA / icbm 37 20 07 N 121 53 38 W / &tSftDotIotE
\
/ Many things are lost for want of asking.
/ (an English proverb)
- Raw text -