CompuServe Messages

#Strings in C

    23-Nov-94 15:57:38
Sb: #44209-#Strings in C
Fm: Steve Goddard 100014,674
To: Shraddhan 70374,754
Hi Shraddan, To answer your second Q: Define a struct: struct Lookup { char *string; int (*func)(void); /* Pointer to func taking no params and returning int */ }; Now you lookup table is an array of these, ie struct Lookup Table[]= { {"String 1", func1}, {"String 2", func2} }; Obviously, you must have some functions like int func1(void); Steve the G. [BEDFORDSHIRE, UK]