A pointless and misleading comment given ‘until’ properly refers to the ‘=‘ part of the conditional contained in brackets which in turn relies on how @OP is expected to interpret their exercise question which is anybody’s guess.
Sounds like this is taking on a life of its own. Perhaps someone will now come in and say <vector>'s or some other STL component should have been used, not to forget const, constexpr, smart pointers, and, gods-forbid, what Herb Sutter has drivelled on about on YouTube. Perhaps there's even room for volatile or recommendations on stack vs heap memory usage to shave off a nanosecond.