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;
}