//in my .h file
array<CompartmentTissue, MAX_TISSUE> tissue;
//in my c++ file
for (int i = 0; i < MAX_TISSUE; i++) {
tissue[i] = new CompartmentTissue();
}
error i got is
no match for 'operator=' (operand types are 'std::array<CompartmentTissue, 16u>::value_type {aka CompartmentTissue}' and 'CompartmentTissue*')
you would need to make tissue a pointer for that kind of syntax i believe (havent written c++ code in a while though). i think what you want is:
tissue[i](constructor_args);
Get rid of the new in your first post, and see if it works. the new operator returns a pointer, and you're not using pointers here. (Your example didn't use pointers, either.)
Also make sure that you have a default (as in, no-arg) constructor implemented in your CompartmentTissue class.