I have a C++ object declared in my Objective-C class.
The C++ object has only one constructor that takes several parameters.
In C++ code I would parse the parameters to the constructor in the initializer list of the class that contains it.
How do I do the same in Objective-C?
When I compile I get an error telling me that there is no appropriate default constructor for my C++ object, as you would expect.
I don’t think you are able to do something like that in Objective-C, because there are no constructors and initializer lists there. But you can use
std::shared_ptror other smart pointer to store a pointer to your class and create the object itself ininitmethod