I'm working with a program at the moment that needs to have an array of undefined length (and of type 'record', which is a struct) that is initialized in a separate function, sorta like so:
I've been looking everywhere and tried everything I could think of. Is there any way to make it so that every time initKnowledgeBase() is called, I can recreate the variable-length knowledgeBase[] array?Code:class MyClass { ... private: record knowledgeBase[]; } ... void MyClass::initKnowledgeBase() { knowledgeBase[] = { ...etc... } }



LinkBack URL
About LinkBacks




