C++代码警告:warning: ‘WebServer::openLinger_’ will be initialized after [-Wreorder]
0.问题:
warning: ‘WebServer::openLinger_’ will be initialized after [-Wreorder]
1.原因
变量的声明顺序,和初始化顺序不一致导致,
2.解决方法
更改变量的声明顺序,使其与初始化顺序一致
warning: ‘WebServer::openLinger_’ will be initialized after [-Wreorder]
变量的声明顺序,和初始化顺序不一致导致,
更改变量的声明顺序,使其与初始化顺序一致