← Destructors & Object Lifetime

Reverse Order

medium

Declare three Resource objects, in order, named "first", "second", and "third" – and nothing else. You’re not writing any destruction logic at all here; the expected output is entirely a consequence of the rule from the lesson: objects sharing a scope are destroyed in the exact reverse of their construction order. Declare them in the order given and let that rule do the rest.

Your solution

"Run" uses the sample stdin (none). "Submit" checks your code against all 1 test case.

Test results

Submit your solution to run it against all test cases.

Hints

    Reference solution