ANSI CPP string concatenation

Lars P. Fischer fischer at iesd.auc.dk
Fri Jun 21 07:17:33 AEST 1991


>>>>> On 19 Jun 91, nigel at cnw01.storesys.coles.oz.au (Nigel Harwood) said:

Nigel> Does anyone know if you can append strings in ANSI C.

"The preprocessor operator ## provides a way to concatenate actual
 arguments during macro expansion. [...]

   #define paste(front, back) front ## back"

	- Kernighan & Ritchie: The C Programming Language, 2.ed, p.90

Found by looking up "concatenate" in the index.

RTFM.

/Lars
--
Lars Fischer,  fischer at iesd.auc.dk   | It takes an uncommon mind to think of
CS Dept., Univ. of Aalborg, DENMARK. | these things.  -- Calvin



More information about the Comp.lang.c mailing list