adding the print age line

This commit is contained in:
Jidong Xiao
2025-04-18 03:10:02 -04:00
committed by JamesFlare1212
parent 2e224420e9
commit 45124db960

View File

@@ -20,4 +20,9 @@ int main(){
// the shared_ptr itself is now empty (i.e., it holds nullptr). // the shared_ptr itself is now empty (i.e., it holds nullptr).
age.reset(); age.reset();
std::cout << "the use count is : " << age.use_count() << std::endl; std::cout << "the use count is : " << age.use_count() << std::endl;
// question: what happens if we print age here:
// std::cout << "age is " << *age << std::endl;
return 0;
} }