Mail Archives: djgpp/2002/09/18/10:01:08
MCheu <mpcheu AT yahoo DOT com> wrote:
> You first declare a global variable named count. This variable is
> visible to all functions within this program, so its scope encompasses
> the scope of func2() as well.
No, that's not the actual problem. That's valid coding (although it's
considered dangerous by some) in C, and still so in C++ AFAIK. This
coding practice might have triggered a warning if you requested the
compiler to be in a very nit-picky mode (---> -Wshadow), but not an
error like the one quoted.
Note that the conflict shown in the quoted error messages was between the
source file and an STL header, not between two places in the source file.
--
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.
- Raw text -