Home > Back-end >  Defined variables from the previous statement after the exchange period of mistakes
Defined variables from the previous statement after the exchange period of mistakes

Time:11-20

 
#include
#include

The class X
{
Public:
Virtual ~ X () {}
};
Class Y: public {X};
Int main (int arg c, char * argv [])
{
STD: : vector A;
A.e mplace_back ();
STD: : unique_ptr & lt; Y> & A=a, [0].
A.e mplace_back ();
STD: : unique_ptr & lt; Y> & B=A, [1].
A.r eset (new Y ());
B.r eset (new Y ());
return 0;
}

The above code to compile successfully, but the runtime for mistakes. But after switching lines 14 and 15 won't appear mistake.
  • Related