यह कोड माना जाता है कि यह जीसीसी के साथ काम करता है - मैं इसे विजुअल स्टूडियो के साथ काम करने की कोशिश कर रहा हूं। मैं यह नहीं समझ सकता कि कोड वास्तव में दोषपूर्ण है या मैं बंदरगाह के साथ कुछ सही नहीं कर रहा हूं।मुझे यह सी ++ त्रुटि नहीं समझती है - त्रुटि C2101: '0' निरंतर
1>c:\somepath\aaa.h(52): error C2101: '&' on constant
1> c:\somepath\aaa.h(52): while compiling class template member function 'const blahblah::Message something::AClass<Type>::aMethod(void) const'
1> with
1> [
1> Type=const lala::BClass&
1> ]
1> c:\somepath\bbb.h(79) : see reference to class template instantiation 'something:AClass<Type>' being compiled
1> with
1> [
1> Type=const lala::BClass&
1> ]
1> MyApplication.cpp
फ़ाइलें
aaa.h:52 virtual const Type aMethod() const { return Type(); }
bbb.h:79 AClass<const BClass&> blahblahblah_;
प्यारा सा बग यह। मुझें यह पसंद है। –
क्या यह एक हालिया संस्करण है? ऐसा लगता है कि वीएस -2010 ने इस त्रुटि संदेश को फिर से बनाया है। – MSalters
अच्छा; यह _is_ यहाँ एक बकवास निदान का थोड़ा सा है। –