C++ name with leading underscore character not Compiling

Chelton Evans cheltonevans@gmail.com
Mon Apr 16 14:13:00 GMT 2007


>And since you think this is important (and I agree), why on earth are
you trying to use >reservered names that will not benefit this
portability which you seek? :P

Pre fixing the underscore character is a technique that was around
before the language evolved.  Generally I use lowercase variables to
name the variables so I had not encountered the problem.  (and I was
coding before compilers were reliable like we know them today)
The compilers that I had used I had not encountered this before.

My main reason for using the underscore character is that unlike other
keyboard characters the underscore character is instinctively read as
a space, and hence the meaning of the variable does not change when
the programmer reads it.
ie  int _mv ... mv(_mv)

The language choose to partly give a most useful character and place
it in the compilers hands which I do object to, as it is a very useful
character for the above reason.

However after this discussion I will add the underscore character to
the end of a variable instead of the start, so thankyou everyone for
contributing and clearing things up.

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

--
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