C++ name with leading underscore character not Compiling

Dave Korn dave.korn@artimi.com
Mon Apr 16 14:28:00 GMT 2007

On 16 April 2007 15:14, Chelton Evans wrote:

> Pre fixing the underscore character is a technique that was around
> before the language evolved.

> The compilers that I had used I had not encountered this before.

  :-)  Welcome to the post K'n'R world.  Things have changed a lot since
pre-1989; there's nothing else for it really, old code just has to be tidied

> However after this discussion I will add the underscore character to
> the end of a variable instead of the start

  This is a well-used and fairly standard technique, particularly in
function-like macros where you want to avoid the risk of clashing with a
variable in the enclosed function.

> I went and checked the pre-processed code and a macro substitution had
> ocurred. 

  Heh, knew it.  Glad it's all cleared up now.

Can't think of a witty .sigline today....

Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

More information about the Cygwin mailing list