共用方式為


編譯器警告 (層級 4,錯誤) C4400

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

備註

constvolatile修飾詞不適用於一般語言執行階段類型變數。

範例

下列範例會產生 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
}