www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/09/18/10:31:11

From: "Kim Seng" <Query AT singnet DOT com DOT sg>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Help in my codes.
Date: Wed, 18 Sep 2002 10:22:46 +0800
Organization: Singapore Telecommunications Ltd
Lines: 35
Message-ID: <am8no9$ll2$1@mawar.singnet.com.sg>
References: <am3jv2$vbr$1 AT reader01 DOT singnet DOT com DOT sg> <3voboug43iagagl91bk5o4buuu2is8fava AT 4ax DOT com> <am4ptt$7g0$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE>
NNTP-Posting-Host: 203.125.52.233
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hi Guys,

Thanks for the information, I tried to run the codes with 2 other compliers,
TClite and MS Visual C++ and I could run the codes as in my attachement. But
for TClite, I had append #include <iosteam.h> instead of #include <iostream>
and comment out using namespace std;
The codes that I had attached is from a reference book that I'm now
learning. But I'm using DJGPP to complie it.
If you are interested in the author, he is SCHILDT. The book name is C++
from Ground up, 2 edn.

Thanks again.

"Hans-Bernhard Broeker" <broeker AT physik DOT rwth-aachen DOT de> wrote in message
news:am4ptt$7g0$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE...
> 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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019