Raúl Gutiérrez Segalés wrote : | In C/C++, why cant a macro take a pointer as an argument ? | | | Thanks, | | Raul Well, it should, i sometimes use the following for debugging : #define strcpy(str1,str2) if (((str1)==NULL) || ((str2)==NULL)) { printf("errmsg\n");} else { strcpy (str1,str2);} (all this is one line !!) Remember that a macro is no more than a litteral substitution, so it might just be a problem with braces, something like the following will not work out like expected : #define bogus(x) x*5 when you use it like this y=bogus(12+3); this will result in y = 12+3*5 which is not the (12+5)*5 you would expect so define your bogus macro like this : #define bogus(x) (x)*5 which will result in y = (12+3)*5; which is (probably) what you expected. Grtz Dries -- <End of message>