简体   繁体   中英

Some questions about constructor chaining in C++

Can i call a constructor within a member function ?Is it an example of constructor chaining? Is constructor chaining valid in the latest C++ version?(like what we have in C#)

1) Yes

2) No, calling a constructor from a function is not constructor chaining.

3) Yes, it is called Delegating Constructors

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM