Re: Having an issue with virtual....
James Kanze wrote:
On Aug 13, 3:46 pm, Victor Bazarov <v.Abaza...@comAcast.net> wrote:
Alf P. Steinbach wrote:
* James Kanze:
.h is already used. Using it for C++ headers creates an
ambiguity. The application associated with .h files is a C
program editor (i.e. a program editor configured for C);
syntax highlighting, for example, won't recognize class as
a keyword, but will highlight it as a user symbol.
I have not experienced this problem.
+1
Since I don't work in C, and the [integrated] editor I use
colors all keywords the same C++ way (even the language
extensions), I don't really care. Besides, if I ever needed
to code in C, why would I use a C++ keyword? Just because I
can? And how? As a variable name? <shrug>
Solution: Just tell your tool that .h is a C++ source (just
like .C or .cc) and everything's gonna be easier, I think.
How is that easier than using a different extension? C and C++
are different langauges---it only makes sense to use different
extensions for their headers.
Sure, they're different languages. But there is a large common subset,
and code written in that subset is valid in both languages. So why
should a header in a C++ project that happens to not use C++-specific
things be labeled as a C header?
--
Pete
Roundhouse Consulting, Ltd. (www.versatilecoding.com) Author of
"The Standard C++ Library Extensions: a Tutorial and Reference"
(www.petebecker.com/tr1book)