title: How to use defaulted and deleted functions C++
body: <p>I recently tried to learn about the defaulted and deleted functions in C++ 11 and i wrote the sample code below. When I try to run it says : </p>
  
  <blockquote>
    <p>error C2065: 'default' : undeclared identifier</p>
  </blockquote>
  
  <p>the Code :</p>
  
  <pre><code>#include "stdafx.h"
  #include &lt;iostream&gt;
  #include &lt;string&gt;
  
  using namespace std;
  
  struct A
  {
      int age;
  
      A(int x): age(x){};
      A() = default;
  
  };
  
  int _tmain(int argc, _TCHAR* argv[])
  {
      A test(10);
      cout &lt;&lt; test.age &lt;&lt; endl;
      return 0;
  }
  </code></pre>