function - What does the ## operator mean/do in this C macro? -
this question has answer here:
#define swap(t, x, y) \ { \ t safe ## x ## y; \ safe ## x ## y = x; \ x = y; \ y = safe ## x ## y; \ } while (0)
the code swaps arguments x , y of type t.
the ## (double number sign) operator concatenates 2 tokens in macro invocation (text and/or arguments) given in macro definition. read more
Comments
Post a Comment