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 neigh x; x.etx=0.0; x.pf=0.0; x.pr=0.0; x.addr="220.23.23.23"; for (i=0;i<5;i++) neigh_list.push_back(x); for (i=0;i<5;i++) printf(" %f\n", neigh_list[i].pf); for (i=0;i<5;i++) neigh_list.erase(neigh_list.begin()+i); return 0; } -- View this message in context: http://old.nabble.com/%27vector%27-was-not-declared-in-this-scope-tp31455480p31459115.html Sent from the gcc - Help mailing list archive at Nabble.com.