I get this warning for these two lines of code:
const int entityNumber = materialNames.size();
SceneNode* nodes[entityNumber];
I thought declaring entityNumber as const would fix this. (It did in a previous version when entity number was just a value I set myself) however it doesn't appear that this works. As you can tell I am quite new to c++, so sorry if this is a stupid question.
materialNames.size()can't be determined at compile-time, then the compiler can't preallocate the memory for the array.