Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Compiler Error C3530

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at Compiler Error C3530.

auto' cannot be combined with any other type-specifier

A type specifier is used with the auto keyword.

To correct this error

  1. Do not use a type specifier in a variable declaration that uses the auto keyword.

The following example yields C3530 because variable x is declared with both the auto keyword and type int, and because the example is compiled with /Zc:auto.

// C3530.cpp  
// Compile with /Zc:auto  
int main()  
{  
   auto int x;   // C3530  
   return 0;  
}  

auto Keyword

Show:
© 2017 Microsoft