adding the print age line
This commit is contained in:
committed by
JamesFlare1212
parent
b8fde0d18e
commit
2e224420e9
@@ -369,5 +369,10 @@ 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;
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user