分享方式:


編譯器警告 (層級 4) C4400

'type' :不支援此類型的 const/volatile 限定詞

const volatile 限定詞不適用於 Common Language Runtime 類型的變數。

範例

下列範例會產生 C4400。

// C4400.cpp
// compile with: /clr /W4
// C4401 expected
using namespace System;
#pragma warning (disable : 4101)
int main() {
   const String^ str;   // C4400
   volatile String^ str2;   // C4400
}