Which of the following function is used to maintain a reference counter with a smart pointer?

151. Which of the following function is used to maintain a reference counter with a smart pointer?

  1. use_count()
  2. count()
  3. ptr_count()
  4. shared_count()

Answer: A) use_count()

Explanation:

The use_count() function is used to maintain a reference counter with a "shared_ptr" smart pointer.

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.