[Sussex] String macros in C/C++

Scott James scott at coldcustard.org
Sun May 29 09:01:31 UTC 2005


On Fri, May 27, 2005 at 06:47:22PM +0100, Rupert Swarbrick wrote:
> I know that the path to the data is something like:
> "/DATADIR/PACKAGE/mainwnd.glade"
> 
> Using something like ostringstream or snprintf, I can concatenate the
> defines together to get the right path, but it feels ungainly -
> especially as all the information is available at compile time, so why
> compute the answer at runtime.
> 
> The question is: Is there a way to concatenate strings in something like
> a #define in C++?

The operator:

##



-- 
S

"Many a time I have wanted to stop talking and find out what I really believed"
  Walter Lippmann
"Hell Yea!!!!"
  Scott James




More information about the Sussex mailing list