共用方式為


編譯器錯誤 C2498

'function' :'novtable' 只能套用至類別宣告或定義

備註

此錯誤可能是透過搭配函式使用 __declspec(novtable) 所造成。

範例

下列範例會產生 C2498:

// C2498.cpp
// compile with: /c
void __declspec(novtable) f() {}   // C2498
class __declspec(novtable) A {};   // OK