已不再支援此瀏覽器。
請升級至 Microsoft Edge,以利用最新功能、安全性更新和技術支援。
位於全域或命名空間範圍的匿名結構或等位必須宣告為 static
位於全域或命名空間範圍但未宣告為 static 的匿名結構或等位。
static
下列範例會產生 C2646,並示範如何修正此問題。
// C2646.cpp // compile with: /c union { int i; }; // C2646 not static // OK static union { int j; }; union U { int i; };
此頁面對您有幫助嗎?