Windows apps
Collapse the table of content
Expand the table of content
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 C3536


The new home for Visual Studio documentation is Visual Studio 2017 Documentation on

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

symbol': cannot be used before it is initialized

The indicated symbol cannot be used before it is initialized. In practice, this means that a variable cannot be used to initialize itself.

To correct this error

  1. Do not initialize a variable with itself.

The following example yields C3536 because each variable is initialized with itself.

// C3536.cpp  
// Compile with /Zc:auto  
int main()  
   auto a = a;     //C3536  
   auto b = &b;    //C3536  
   auto c = c + 1; //C3536  
   auto* d = &d;   //C3536  
   auto& e = e;    //C3536  
   return 0;  

auto Keyword

© 2017 Microsoft