Hello. I need to create a dynamic three-dimensional array. the fact is that I don't know the size of the array at the beginning. and recognize them later in one of the functions. and in one of the same functions I need to set the values of the elements of this array. I think to do it through vectors. I have a class in which I declare a three-dimensional vector
class Base { private: static std::vector<std::vector<std::vector<unsigned char> > > mas; static void func1(); static void func2(); ... }
and in one of the functions, as I recognize the size of the array, I change it through resize. those. for one dimension I do it (for example)
int nj=14; mas.resize(nj);
Generally do through resize is suitable for this task? I get this error:
Error 194 error LNK2001: unresolved external symbol "private: static class std::vector<unsigned char,class std::allocator<unsigned char> > environment::mas" (?mas@environment@ @2V ?$vector@EV?$allocator@E @std @@ @std @ @A ) C:\Users\jh\Desktop\App.obj MyFirstApp Error 195 error LNK1120: 1 unresolved externals