編譯器警告 (層級 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 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應