Compiler Error C2779
'declaration' : property methods can only be associated with non-static data members
The property
extended attribute is incorrectly applied to a static data member.
The following sample generates C2779:
// C2779.cpp
struct A {
static __declspec(property(put=PutProp))
// try the following line instead
__declspec(property(put=PutProp))
int prop; // C2779
int PutProp(void);
};
Pripomienky
https://aka.ms/ContentUserFeedback.
Pripravujeme: V priebehu roka 2024 postupne zrušíme službu Problémy v službe GitHub ako mechanizmus pripomienok týkajúcich sa obsahu a nahradíme ju novým systémom pripomienok. Ďalšie informácie nájdete na stránke:Odoslať a zobraziť pripomienky pre