Quiz on C++ Bad Weak Pointer Exception Handling



1. What does 'bad_weak_ptr' indicate in C++?
2. When is a 'bad_weak_ptr' exception thrown?
3. Which C++ header file must be included to use 'bad_weak_ptr'?
4. What is the purpose of weak_ptr in C++?
5. How can you check if a weak_ptr is expired?

Advertisements