Coming from the Java and C# world, I always like to use
someclass a = someclass();
instead of
someclass a();
to initalize a class variable in C++. However, my compiler sometimes complain
Error C2280: Attempting to reference a deleted function
Is there any difference between them? Which one is better?