class Myclass {
public:
int value;
Myclass(int a):value(a) {}
};
Say I have a class declared and defined above. I'm trying to instantiate a Myclass
instance. Which of the following ways is the most efficient?
(By "More efficient" I mean the code will execute faster.)
Myclass c1(123);
Myclass c2=123;
Myclass c3{(123)};
Myclass c4{123}; // Is this called using "initialization list"?