Linux 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 (after having included <vector> header):
If I had to guess, I'd say that you didn't include <vector>, even though you say you have.
Also, you cannot use in a template argument an object where that object has local scope. You will have to move your definition of the neigh struct. Also, this is C++; not C. You don't need to create your structs with that clumsy typedef anymore and when you create an instance of a struct, do not do it like this: