function - What does the ## operator mean/do in this C macro? -


#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

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -