On (23 Apr 97) Anthony Tibbs wrote to Kurt Kuzba...
AT> On Apr 19 11:09, 1997, Kurt Kuzba of 1:154/750 wrote:
KK> char* FromName[36];
KK> char* ToName[36];
KK> char* Subject[72];
AT> "char *FromName [36];" ? This won't/shouldn't even compile correctly.
It had better compile, or the the compiler's broken.
AT> You *should* be using either of the following two methods:
[ demo code elided ]
AT> The second method would be the easiest. However, the the method you
AT> specified is saying this: I want a pointer to a pointer to a 36 byte
AT> char. (I know it is possible to have a pointer to a pointer, but not
AT> in this case.)
Actually, what he declared were perfectly legal - they're arrays of
pointers to char - i.e. arrays of strings. These are useful if you have
a bunch of strings of widely varying lengths, so you want to only
allocate as much for each string as needed.
Later,
Jerry.
... The Universe is a figment of its own imagination.
--- PPoint 1.90
---------------
* Origin: Point Pointedly Pointless (1:128/166.5)
|