In an interview I was asked following question
Given the code fragments below, where the ellipsis (…) represents code that has not been disclosed to you:
class X { … }; class Y { public: explicit Y(const X& x); … };
what can you say about the compilation and execution of each of the following statements? Describe each of the operations that occur as this code executes.
Y func(Y y) { … }
X x;
Y y = func(Y(x));
I could not understand the question properly hence was not able to answer. if some one could explain me what answer was expected of me or share any link which I can go through, that would be really nice. Many Thanks.
Aucun commentaire:
Enregistrer un commentaire