Home »
MCQs »
C++ MCQs
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?
- use_count()
- count()
- ptr_count()
- shared_count()
Answer: A) use_count()
Explanation:
The use_count() function is used to maintain a reference counter with a "shared_ptr" smart pointer.