OK I am currently building a matrix using the std vectors that is meant to have a cell or bacteries on them. Because of this I made a "dead" class to be mother of cell and bacteries. So in the matrix a case that does not have either of them would be dead.
But when I try to build the matrix, by somthing like: world[x][y] = new cell()/world[x][y] = new bacterie(); it will not compile.
so my question is, how can I initialize it?
this is my code, its on spanish sorry.
matrizB[fila-1][columna-1] = new BacteriaM();
matrizB its a
vector<vector <dead>> matrizB(n);
and BacteriaM is a class that inherits from dead; n is defined by the user. (sorry for bad grammar and programing, i'm new to programing)