Unresolved external symbol C++

*爱你&永不变心* 提交于 2019-11-29 15:24:25

Unlike instance variables that require only a declaration, static member variabs of the class must also be defined.

Currently, your code contains only a declaration. Add a definition of your static fd variable to a cpp file to fix the error:

int ProgrammSettings::fd;

You need to add the following line to the start of your cpp file

 int ProgrammSettings::fd;

Static data members declarations in the class declaration are not definition of them You have forgot to add the definition to match your declaration of fd.
You must explicitly define your class's static data members.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!