編譯器警告 (層級 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
}
意見反映
https://aka.ms/ContentUserFeedback。
即將推出:我們會在 2024 年淘汰 GitHub 問題,並以全新的意見反應系統取代並作為內容意見反應的渠道。 如需更多資訊,請參閱:提交及檢視以下的意見反映: