STL in MSVC6.0
I was under the impression that to use the STL in MSVC++ 6.0 all you had to do was include this little line:
using namespace std;
I know I have done this before, but now I get this error:
error C2871: ''std'' : does not exist or is not a namespace
I can''t think of a single setting I''ve changed since using it last. Has anyone else run into this problem and/or have a solution?
Thanks,
->Briar LoDeran <-
1) You have to also include the libraries you want to use, i.e. any of the libraries that don''t end in ".h". These all have namespace std declared in them.
2) Make sure you get the service packs. They''re up to SP4 now.
2) Make sure you get the service packs. They''re up to SP4 now.
Well I''ve got SP4 on here. Also, I forgot to mention this, but the program I was compiling was as follows:
using namespace std;
int main(void)
{
return (0);
}
...not much to go wrong, eh?
-> Briar LoDeran <-
using namespace std;
int main(void)
{
return (0);
}
...not much to go wrong, eh?
-> Briar LoDeran <-
July 13, 2000 02:12 PM
Like the dude above you just said, you need to include an stl header before doing the using namespace std. or, you can do
namespace std { };
using namespace std;
namespace std { };
using namespace std;
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement