Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!godot!harvard!seismo!brl-tgr!tgr!ssp@AMES-NAS.ARPA From: ssp@AMES-NAS.ARPA (David Coffing) Newsgroups: net.lang.c Subject: define constants within strings Message-ID: <8780@brl-tgr.ARPA> Date: Thu, 28-Feb-85 13:59:40 EST Article-I.D.: brl-tgr.8780 Posted: Thu Feb 28 13:59:40 1985 Date-Received: Sat, 2-Mar-85 04:25:58 EST Sender: news@brl-tgr.ARPA Lines: 16 Is there a way to insert a define constant into the middle of a quoted string at compile time? I have some site-dependent menu headers and am always annoyed when I have to "sprintf" them before using them. #define SITE "Ames Research" char title2[] = " - Fancy Title"; char title[80]; sprintf(title, "%s%s", SITE, title2); domenu(title); The pre-processor should have something that helps. Please repond via mail. Chuck Collins cpc@ames-nas {ihnp4,hplabs}!ames!amelia!cpc