STL in vs 2005

D

dk60

I am trying to use vector in C++ visual studio.net 2005. I do
#include <vector>, but the compiler does not seem to recognize the
corresponding code, when I define
vector<int> my_vector
Is there anything else I should configure in the project?

thanks
 
J

Jochen Kalmbach [MVP]

Hi dk60!
I am trying to use vector in C++ visual studio.net 2005. I do
#include <vector>, but the compiler does not seem to recognize the
corresponding code, when I define
vector<int> my_vector
Is there anything else I should configure in the project?

STL is normaly inside the namespace "std"... so either declare:

using namespace std;

or write

std::vector<int> m_vector;

--
Greetings
Jochen

My blog about Win32 and .NET
http://blog.kalmbachnet.de/
 
P

Pixel.to.life

Hi dk60!


STL is normaly inside the namespace "std"... so either declare:

using namespace std;

or write

std::vector<int> m_vector;

--
Greetings
Jochen

My blog about Win32 and .NET
http://blog.kalmbachnet.de/


This has nothing to do with VS.2005. As Jochen suggests, either
specify the std namespace, or specify explicitly where to look for the
definition of vector.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top