0

const A &x = A(1); // where A is a defined class

What does the above line mean?

9th Jul 2017, 3:53 AM
Kushagra Agarwal
Kushagra Agarwal - avatar
1 Resposta
+ 1
It creates a constant instance of A class, which is initialized with 1 (passing 1 to the constructor).
10th Jul 2017, 2:53 AM
Ali Rashidi
Ali Rashidi - avatar