trouble with macro`s

Andrew Davidson aed at netcom.COM
Sat Mar 9 10:35:43 AEST 1991


Hi I am having trouble with my preprcessor. I am trying to write a
macro that just concates its argument. ie

#define name2(a,b) ????????

the call name2(Andy,Davidson) should produce AndyDavidson.

I belive that ansi preprocessors are supposed to support this as
follows

#define name2(a,b) a##b

unfortuanly I am using a k&r compiler (I am working on a sun work
station and can not change compilers)

Anyone familar with C++ will noticed that the name2 macro is defined
in generic.h


thanks in advance 

-- 
-----------------------------------------------------------------
                  "bede-bede-bede Thats all Folks"
				Porky Pig
Andy Davidson
Woodside CA.
aed at netcom.COM
-----------------------------------------------------------------



More information about the Comp.lang.c mailing list