problem use stl with vc 6.0 - Programmer
This is a discussion on problem use stl with vc 6.0 - Programmer ; Hi,
I want to use some function of STL using VC++ (visual studio 6.0).
The problem I have is that the compiler does not recognize the STL
functions.
Each time I call in my code the STL functions : the ...
-
problem use stl with vc 6.0
Hi,
I want to use some function of STL using VC++ (visual studio 6.0).
The problem I have is that the compiler does not recognize the STL
functions.
Each time I call in my code the STL functions : the compiler generate
an error.
I ask in my code :
#include
#include
int main (int argc, char** argv)
{
string a("aa");
cout << a << endl;
}
The compiler answers me he does not find the class :
HTML.cpp(12) : error C2065: 'string' : undeclared identifier
I tried in the option/directories of my project to include the STL
library files inserting :
C:\Program Files\Microsoft SDK\STLport-4.6.2\stlport
But it does not work : I do not know how to integrate the STL library
in my project.
I thank you very much for your time&reply,
--
Mickey Joutear
C & VB developper
-
Re: problem use stl with vc 6.0
Hallo mickeydisn@gmail.com!
> I ask in my code :
> #include
> #include
> int main (int argc, char** argv)
> {
> string a("aa");
> cout << a << endl;
> }
>
> The compiler answers me he does not find the class :
> HTML.cpp(12) : error C2065: 'string' : undeclared identifier
And the compiler is right, because all STL classes are patr of the
namespace std.
Either use:
using namespace std;
or write
std::string a("aa");
....
--
Martin Richter [MVP] WWJD
"In C we had to code our own bugs. In C++ we can inherit them."
FAQ : http://www.mpdvc.de
Samples: http://www.codeguru.com http://www.codeproject.com