Consider the following code:
class Game {
private:
vector<SomeType*> vec;
OtherType obj;
public:
Game(char* configuration_file);
};
How should one implement the Game constructor considering that both vec and obj are dependent on configuration_file content?
Initialization list is impossible to use since configuration_file has to be parsed before constructing vec and obj.
If i will constrcut vec and obj inside the body of the constructor, than both default constructors for both of them will be called, is there a way to prevent this ?
What is the normal way to do this kind of things ?
Thanks.