Share via


編譯器錯誤 C2583

'identifier' : 'const/volatile' 'this' 指標對於建構函式/解構函式不合法

建構函式和解構函式宣告為 const 或 volatile。 這是不允許的。

下列範例會產生 C2583:

// C2583.cpp
// compile with: /c
class A {
public:
   int i;
   A() const;   // C2583

   // try the following line instead
   // A();
};