Hi,
I am sorry i am posting this question here, but i have been using perl only for most uses and is not a member of any other programming forums. So please help me if any of you could.
I am writing a c program and i want to define a macro where i can print a variable's name and value
So if i use the code as DBG(memory);
It should print "DBG>> memory == (value of memory)"
I have written teh macro as follows
#define DBG(x) printf("DEBUG >> \(x) == %d\n",(x))
But when i call the macro as DBG(u4_heap_mem_size);
It prints DEBUG >> (x) == 8890 ;
The latter part is correct but for the former part i want u4_heap_mem_size to be printed i.e
DEBUG >>u4_heap_mem_size == 8890
Does any one know how this can be done??
Thanks in advance..