adding unique ptr example

This commit is contained in:
Jidong Xiao
2025-04-18 03:41:08 -04:00
committed by JamesFlare1212
parent 0fc129f674
commit feeb84eae7
2 changed files with 2 additions and 2 deletions

View File

@@ -13,7 +13,7 @@ int main(){
std::unique_ptr<std::string> s2(std::move(s1));
// Question: which of the following line will trigger a seg fault?
// Question: which one of the following two lines will trigger a seg fault?
// std::cout << "s1:" << *s1 << std::endl;
// std::cout << "s2:" << *s2 << std::endl;