Initialization of vector in a constructor - C++
问题 I'm struggling with the constructor of one of my classes do to a member that is not initialized properly. I have a class "Settings" that handles the setting I use for my simulations and a class Simulations that performs the simulation steps. What I can't understand is why this code doesn't work as expected: class Settings{ public: int n ; // a number I need to create properly a vector in my class simulation // ... rest of the code constructors etc to read values from files. // everything