I have a two dimensional vector
std::vector< std::vector<unsigned long int> > reference_index_vector(2, std::vector<unsigned long int> ());
and I have other two dimensional vector
std::vector< std::vector<unsigned long int> > read_index_vector(2, std::vector<unsigned long int> ());
I need both the vector
in other files so I defined them as extern
in .h
file, however on compilation I get errors
../read_index.cpp:22:65: error: redefinition of ‘std::vector > read_index_vector’ std::vector< std::vector< long unsigned int> > read_index_vector(2, std::vector< long unsigned int> ());^ In file included from ../read_index.cpp:17:0: ../read_index.h:16:54: note: ‘std::vector > read_index_vector’ previously declared here extern std::vector< std::vector > read_index_vector(2, std::vector ());