Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C++ 版本的问题。 #106

Open
okman334 opened this issue Jul 8, 2024 · 1 comment
Open

C++ 版本的问题。 #106

okman334 opened this issue Jul 8, 2024 · 1 comment

Comments

@okman334
Copy link

okman334 commented Jul 8, 2024

C++版本只有一个头文件,而头文件里面有个静态变量IdGenerator *IdGenerator::instance,如果在多个模块下#include "IdGenerator.h",会出现重复定义吧。应该把IdGenerator *IdGenerator::instance = NULL放到到cpp文件里面才比较符合工程上应用吧。

@rinace43
Copy link

老哥怎么样这样定义影响功能吗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants