नोट
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप साइन इन करने या निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
'identifier' : no 'get' method is associated with this property
Remarks
A data member declared with the property extended attribute does not have a get function specified, but an expression tries to retrieve its value.
Example
The following example generates C2775:
// C2775.cpp
struct A {
__declspec(property(put=PutProp2, get=GetProp2)) int prop2;
int GetProp2(){return 0;}
void PutProp2(int){}
__declspec(property(put=PutProp)) int prop;
int PutProp(void){}
};
int main() {
A* pa = new A;
int x;
x = pa->prop; // C2775
x = pa->prop2;
}