extern auto variable has no initializer

后端 未结 1 1909
旧巷少年郎
旧巷少年郎 2021-01-22 23:00

I need to use a global timestamp (std::chrono::high_resolution_clock::now()) in my c++ program. I declared it in the header file Header.h:

#include         


        
相关标签:
1条回答
  • 2021-01-22 23:24

    How is auto supposed to deduce the type of start?
    You need to declare the type

    extern std::chrono::high_resolution_clock::time_point start;
    
    0 讨论(0)
提交回复
热议问题