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 :
error C2065: 'default' : undeclared identifier
the Code :
#include "stdafx.h"
#include <iostream>
#include <string>
using namespace std;
struct A
{
int age;
A(int x): age(x){};
A() = default;
};
int _tmain(int argc, _TCHAR* argv[])
{
A test(10);
cout << test.age << endl;
return 0;
}