Compiler Error C2270
'function' : modifiers not allowed on nonmember functions
A nonmember function is declared with const, volatile, or another memory-model modifier.
The following sample generates C2270:
// C2270.cpp
// compile with: /c
void func1(void) const; // C2270, nonmember function
void func2(void);
class CMyClass {
public:
void func2(void) const;
};
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