Sam Trenholme's webpage
This article was posted to the Usenet group alt.hackers in 1995; any technical information is probably outdated.

Re: C/C++ tricks

Article: 7254 of alt.hackers
From: (Markus Freericks)
Newsgroups: alt.hackers
Subject: Re: C/C++ tricks
Date: 28 Jan 1995 13:10:11 GMT
Organization: TU Berlin Fachbereich Informatik
Lines: 24
Approved: [;-]
Message-ID: 3gdfgs$
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
In-reply-to:'s message of 27 Jan 1995 16:53:55 MET
Status: RO

In article <3gb4uj$> (Robert A
Holak) writes:
> Does anyone have a list of C/C++ tricks? I saw some posted before on this
> group, but I have lost them.  They were things like x=y=y=x (that was
the form,
> not the exact vars, though, that would switch x and y without a temp
> AND without calling a function.)  There were others, like :
> #define TRUE = "/"/"/"
> #define FALSE= "-"-"-"

These have to be

#define TRUE  '/'/'/'
#define FALSE '-'-'-'

of course.


ObLameWWWHack: our WWW server translates any URLs that point to a directory
that does not contain an index.html file into a page that contains a
listing of said directory. The server also appends the contents of the
README file (if there is any) to this listing. The README doesn't look very
nice, since it is set in into <pre>...</pre>.  Solution: start
with </pre> and end it with <pre>. Within the README, all the
nice markup
tag can now be used.


Back to index