Excuse me, could someone help me?
This code from an ebook and it isn’t wrong but it gives an error while being compiled. I don’t understand what error it is.
error C2653: 'vector<int,class std::allocator<int> >' : is not a class or namespace name

#include<vector>
using std::vector;

int main()
{
	vector<int> a;
	vector<int>::iterator iter = a.begin();
	return 0;
}

I tried another ways and this way works. I don’t know what happens to it.

#include<vector>

int main()
{
	std::vector<int> a;
	std::vector<int>::iterator iter = a.begin();
	return 0;
}

>Works fine with VC++ 2005/2008
As it should. The code is correct, but I'm willing to bet that this is yet another bug in Visual C++ 6.0.

The compiler i use is "Microsoft Visual C++ 6.0 Enterprise Edition" ^^. Please help me >"<.

As Narue already told you: this is probably a bug in the (old) vc6 compiler. So the solution would be to download something newer, like Visual Studio 2008 express (free)

This question has already been answered. Start a new discussion instead.