static member of the class not calling constructor

前端 未结 0 756
鱼传尺愫
鱼传尺愫 2020-12-23 11:31
#include 

class Temp {
 public:
  static Temp temp;

  Temp() { std::cout << "hi!"; }
};

int main() {}

Suprisingly

相关标签:
回答
  • 消灭零回复
提交回复
热议问题