in reply to [OT] Macro Problem

i want to define a macro where i can print a variable's name and value
#define DBG(x) printf("DEBUG >> "#x" == %d\n",(x))

See Quoting macro arguments

Example:

#include <stdio.h> #define DBG(x) printf("DEBUG >> "#x" == %d\n",(x)) int main() { int u4_heap_mem_size = 8890; DBG(u4_heap_mem_size+1); // prints DEBUG >> u4_heap_mem_size+1 + == 8891 return 0; }