This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Vector: at() member function



Which would be the correct list to direct the following question:

Am I doing something wrong here?

sparky%cat vector.c
#include <vector>

int main(void);

int main(void)
{
    vector<int> v(10);
    v.at(3)=7;

    return 0;
}
sparky%g++ vector.c
vector.c: In function `int main()':
vector.c:8: no matching function for call to
`vector<int,__default_alloc_template<false,0> >::at (int)'
sparky%g++ -v
Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.6/2.8.1/specs
gcc version 2.8.1
sparky%


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]