So today's exercise wants me to use this header.h
obviously to give me the function corresponding to the operator.
#ifndef __HEADER__
#define __HEADER__
operator operator_table[] = {{"-", &function_sub}, \
{"+", &function_add}, \
{"*", &function_mul}, \
{"/", &function_div}, \
{"%", &function_mod}};
#endif
First thing I noticed is that operator
type isn't defined so maybe I should typedef
it to an int
?
Then the real problem start, I've read both K&R and C Primer Plus from beginning and haven't encountered this syntax, or at least I don't recognize it, is it some kind of dictionary
? How can I use it ?