共用方式為


編譯器錯誤 C2270

'function': 非member 函式上不允許修飾詞

非記憶體模型函式是以 constvolatile 或其他記憶體模型修飾詞宣告。

下列範例會產生 C2270:

// C2270.cpp
// compile with: /c
void func1(void) const;   // C2270, nonmember function

void func2(void);

class CMyClass {
public:
   void func2(void) const;
};