Day 2 tackles one of C++'s most important modern features: smart pointers. These RAII-based tools eliminate memory leaks.
unique_ptr: Exclusive Ownership
unique_ptr provides exclusive ownership semantics. When it goes out of scope, the memory is automatically freed. Perfect for single-owner scenarios.
shared_ptr: Shared Ownership
When multiple parts of your code need to share ownership, shared_ptr uses reference counting to manage the lifetime automatically.
Today's Challenge
Convert a program using raw pointers to smart pointers. Run it through Valgrind to verify zero memory leaks!
