Initialization of object static members

前端 未结 7 1057
余生分开走
余生分开走 2021-01-24 21:51

Static members confuse me sometimes. I understand how to initialize a simple built in type such as int with something along the lines of int myClass::statVar

7条回答
  •  温柔的废话
    2021-01-24 22:18

    You could create wrapper class which will hold RandomGenerator instance in it and will call RandomGenerator::Randomize in its constructor.

提交回复
热议问题