??? 02/23/08 18:28 Read: times |
#151341 - With proper ordering in source file... Responding to: ???'s previous message |
Since sizeof() is a compile time calculation and if you order the stuff in the source correctly ... such as putting the string array at the top of the file where it is easier to find for later maintenance anyway ... you may be able to keep the MAX_STRINGS type of macro and code it as follows:
#define MAX_STRINGS (sizeof(phrases)/sizeof(char *)) Michael Karas |