dimanche 27 septembre 2020

Are the following 3 ways to define objects identical?

When defining variables or objects, I notice there are three ways as follows.

What are the differences between the following?

Person p{};            // Case 1
Person p = Person{};   // Case 2
Person&& p = Person{}; // Case 3

Aucun commentaire:

Enregistrer un commentaire