[Solved] Macros in C++ breaks with postfix increments
[ad_1] You can’t use this macro outside of a function, because it’s an arbitrary expression, that’s why you’re getting an error. Just move the invocation of the macro into function scope and it will work: #define MAX(x, y, r) ((x) > (y) ? (r = x) : (r = y)) int x = 10; int … Read more