
please wait
foo = some_array[bar][another_array[get_index()]];
#define GET_STUFF(bar) (some_array[bar][another_array[get_index()]])
inline
function for that (I didn't for other reasons):
|
|
inline
, you ask?#define
is a holdover from C. #defines were (and still are) a preprocessor facility that simply perform text substitution. They can appear to simplify your code, or they can make you code more difficult to read. #defines have global scope so they can unexpected consequences if used where not intended.