vector and iterator in gcc/g++ C++ library

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux