Uninitialized constant members in classes

前端 未结 3 604
心在旅途
心在旅途 2021-01-04 17:50

This is probably a ridiculously easy question, but I\'ve been searching around for the answer for a while yet can\'t seem to figure this out. I\'m trying to initialize a con

3条回答
  •  醉话见心
    2021-01-04 18:46

    The problem is in the default constructor, it should be

    Scheduler::Scheduler() : thresh(0) {}
    

    or not be implemented at all.

提交回复
热议问题