'vector' was not declared in this scope

Jonathan Wakely jwakely.gcc@gmail.com
Fri Apr 22 12:09:00 GMT 2011


On 22 April 2011 11:03, ales88 wrote:
>
> GCC says that in line 10 there's the error: 'vector' was not declared in this
> scope. An extract of the source code is the following:
>
> typedef struct {
>
> float etx, pf, pr;
> struct in_addr addr;
>
> }neigh;
>
> std::vector<neigh>neigh_list;   (here is line 10)
>
> Please somebody help me!!!!

This is not the right place to learn C++, but your problem seems to be
that you didn't include the <vector> header



More information about the Gcc-help mailing list