This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
vector and iterator in gcc/g++ C++ library
- From: "Luu Vo" <vtluu at tma dot com dot vn>
- To: <gcc-help at gcc dot gnu dot org>
- Date: Thu, 3 Jun 2004 08:44:09 +0700
- Subject: vector and iterator in gcc/g++ C++ library
Could you please tell me why the following lines of code don't compile with
g++ in Redhat Linux 9 while they compile OK with Ms VC++ 6
#include <vector>
int main() {
vector<int>::iterator it;
int *pi;
pi = it; //error
pi = (int *) it; //error
return 0;
}
Any help will be appreciated.
Thanks,
Luu Vo.