I want to assign an object to volatile object in the same type, but failed to do so with compiler error. How to change the program to make it? Besides to make it to work, why i can't do it directly?
I used Visual Studio 2010 as compiler here.
class A
{
public:
};
int _tmain()
{
A a;
volatile A va;
va = a; // compiler error:C2678 here
return 0;
}