<<Deep Exploration C ++ Model>> Question (Chapter 2) (below)

zhaozj2021-02-11  216

2.3 Program Transformation Language

1. X is a class, known to have X X0; then,

(1) x x1 (x0);

(2) x x2 = x0;

(3) X x3 = x (x0); what is different? What is the respective efficiency? (P61, p70)

2. How do you do a Class Object as a function as a parameter? (P62-P63)

3. When a function returns a Class Object, what will the compiler do? (P63)

4. A function,

X Bar (Const T & Y, Const T & Z)

{

Return X (Y, Z); ---------------- L1

}

What effect is this this sentence? (65-66)

5. What is the process of NVR optimization? What is the benefit? (P66-p67)

6. What is the necessary condition for the compiler to implement NVR optimization? (P67)

7. What are the reasons for NVR criticism? (P68-P70)

8. When should you write "Copy Constaructor" yourself? what is the reason? (P72-P73)

2.4 Members' initialization team

1. Do you have to use a "Initialization List"? (P74-P75)

2. "Member Initialization List" Is a set of functions call? (P76-p77)

3. What is the call order of "MEMBER INITIALIZATION LIST"? (P77)

4. Where is the "Member Initialization List" is placed in a function? (P79)

5. In "Member Initialization List", can I use a MEMBER FUNCTION to set an init value of a MEMBER? What should I pay attention to? (P79-P80)

转载请注明原文地址:https://www.9cbs.com/read-4942.html

New Post(0)