Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re: Christmas poem since 1988

by truedfx (Monk)
on Dec 24, 2005 at 16:08 UTC ( #518911=note: print w/replies, xml ) Need Help??

in reply to Christmas poem since 1988

Strict C compilers (tendra in default mode, gcc with -pedantic-errors) refuse to compile this, because while char v[]="..."; is valid, char v[]=("..."); is not. I haven't yet figured out what the third language is, if you don't mean C++, so I'm not sure if this breaks that, but my simple suggestion to resolve this is:

Instead of
#define q char w=0,v[]=
you can use
#define q(x) char w=0,v[]=x

It doesn't affect the output with less strict C compilers (gcc in default mode, icc), nor does it affect the output as a Perl script.


Update: I see now that the output is different when compiled as C++ instead of C ("only" instead of "true"), so it must be that that was what you meant.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://518911]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (2)
As of 2019-08-23 05:44 GMT
Find Nodes?
    Voting Booth?

    No recent polls found