Role of "namespace std"


I am using root on Win32, Win XP and MS VC 6; developing with .dsp files.
It works fine on my home computer, but I receive compile-time errors on my office computer, like

[quote]c:\root\include\tstring.h(408) : error C2039: ‘atoi’ : is not a member of 'std’
c:\root\include\tstring.h(411) : error C2039: ‘atof’ : is not a member of ‘std’
I guess that the source is the setting in tstring.h

#ifdef R__GLOBALSTL namespace std { using ::string; } #endif
Can someone please tell me
1./ What it the role of this
2./ What can be the difference which prevents to compile the same project on a different machine?



Sorry, I forgot:
in both cases I use 4.04, with default settings


If you want ROOT 4.04/02 to work with MSVC6, you might have to comment the declarations of atoi and atof in the header of TString.h.

With the latest version of ROOT, VC 7.1 is the only version supported. I have seen similar errors on all the Win32/MSVC6 computers I’ve tried compiling on.

However, I have no particular idea on what could allow your code to compile on your home machine with the same configuration.

The CVS head should compile again on VC++6.
We urge users to move to VC++7.1


The role of the code you quote is to allow the code to compile on some odd platform where string was not part of the std namespace.
ROOT 4.04/02 is not support for VC6. Thanks to Valeriy Onuchin the code currently in CVS (ROOT 5.01/01) does work on VC6 and will try as much as possible to keep it working.