Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
'type': incorrect usage of 'auto'
Remarks
The indicated type cannot be declared with the auto keyword. For example, you cannot use the auto keyword to declare an array or a method return type.
To correct this error
Ensure that the initialization expression yields a valid type.
Ensure that you do not declare an array or a method return type.
Examples
The following example yields C3532 because the auto keyword cannot declare a method return type.
// C3532a.cpp
// Compile with /Zc:auto
auto f(){}   // C3532
The following example yields C3532 because the auto keyword cannot declare an array.
// C3532b.cpp
// Compile with /Zc:auto
int main()
{
   int x[5];
   auto a[5];            // C3532
   auto b[1][2];         // C3532
   auto y[5] = x;        // C3532
   auto z[] = {1, 2, 3}; // C3532
   auto w[] = x;         // C3532
   return 0;
}