我很困惑编译失败和编译失败。如果我在Visual Studio中编写一些代码,那么如果它报告生成失败,那么这也意味着编译器在程序中发现了一些错误?编译失败vs编译失败
实际上,初始化静态变量多次后,我得到了构建错误。
<code>
int Child::count = 1;
int Child::count = 2;
</code>
<code>
1>c:\users\muzammil\desktop\testproject\testproject.cpp(93): error C2374: 'count' : redefinition; multiple initialization
1> c:\users\muzammil\desktop\testproject\testproject.cpp(83) : see declaration of 'count'
1>
1>Build FAILED.
</code>