'vector' was not declared in this scope

Jonathan Wakely jwakely.gcc@gmail.com
Sat Apr 23 08:06:00 GMT 2011


On 22 April 2011 22:38, ales88 wrote:
>
>
>
> Jonathan Wakely-4 wrote:
>>
>> On 22 April 2011 21:37, ales88 wrote:
>>>
>>>
>>> Yes, I've included <vector> header!
>>
>> Well then if you want anyone to be able to help you need to provide a
>> complete example that fails, not just an extract.
>>
>>
>
> THIS IS THE ENTIRE CODE:
>
> #include <vector>
> #include <sys/types.h>
> #include <netinet/in.h>
> #include <vector>
>
> int main() {
>
> int i=1;
>
> typedef struct {
>
> float etx, pf, pr;
> struct in_addr addr;
>
> }neigh;
>
> vector<neigh>neigh_list;  //HERE IS THE PROBLEM

This does not match your original extract. The problem here is you
haven't said std::vector.

If you want people to help then you need to show the actual code that
isn't working, not something similar but different.



More information about the Gcc-help mailing list