Practice · 1 of 1
Ownership Transfer
CHALLENGE
Difficulty: beginner+25 XP
Implement make_counter() returning std::unique_ptr<int> holding 0, and take_and_bump(std::unique_ptr<int> p) that increments the value and RETURNS the same pointer onward.
Press Submit to check your solution.
Back to lesson: Practice: RAII Practice: Own It Once