編譯器錯誤 C3530
'auto' 無法與任何其他類型規範結合
型別規範會與 關鍵詞搭配 auto
使用。
更正這個錯誤
- 請勿在使用
auto
關鍵詞的變數宣告中使用類型規範。
範例
下列範例會產生 C3530,因為變數會以 auto
關鍵詞和類型 int
宣告,而且因為此範例是以 /Zc:auto 編譯。x
// C3530.cpp
// Compile with /Zc:auto
int main()
{
auto int x; // C3530
return 0;
}