RE: comment class feature; VC6 namespace bug workaround

"Kyle Schaffrick" <[email protected]>
Newsgroups gmane.comp.gcc.cgicc.general
Message-ID <000301c1e728$032b4500$22a910ac@ferocity>
Mistake in my previous post... It was just so simple, I *HAD* to screw
it up. :)

> ----------------------------
> STDNS string
> CGICCNS CgiInput::getenv(const char *varName)
> {
>   char *var = 
> // MSVC C++ 6.0 lib problem, <cstdlib> is not in std 
> namespace #if defined(_MSC_VER) && _MSC_VER < 1201 // 
> hopefully they get it right next time
>               STDNS 
> #else // don't call the member function
>                  ::
> #endif
>                     getenv(varName);
>   return (var == 0) ? "" : var;
> }
> -----------------------------

...should be...

----------------------------
STDNS string
CGICCNS CgiInput::getenv(const char *varName)
{
  char *var = 
// MSVC C++ lib problem, <cstdlib> is not in std namespace
#if defined(_MSC_VER) && (_MSC_VER < 1201) // hopefully they get it
right next time
                 :: // don't call the member function
#else 
              STDNS 
#endif
                    getenv(varName);
  return (var == 0) ? "" : var;
}
----------------------------

Sorry for the mix-up!

-- kyle
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.