0
Can we have one class object created and then append the values to its object?
Hi Refer code below: https://www.sololearn.com/en/compiler-playground/cYUOt0dCYvE4 I know there are lot of static methods and raw pointer, but I cannot have control to modify it. My query is related to logger class. It has only one member variable of string type, but I need its multiple values. I can easily create vector<string> and store values into it. But how to store different objects into one object? Currently, loggerNamespace::AddToLog("Ketan 1"); create first object and all three other calls create another three objects. Can we have some mechanism to create it for first time and then don't create it but append to it? https://sololearn.com/compiler-playground/cYUOt0dCYvE4/?ref=app
3 Answers
+ 2
Ketan Lalcheta
your constructs are always so complicated.....
are circular dependencies really unavoidable?
how about vectors and initializer_list?
https://sololearn.com/compiler-playground/cC5c82yrTILf/?ref=app
0
Yes
0
Could not get you