Is there a reason you’re married to it being in C++? Maybe that’s the language you know, and that’s fine. Thing is, though, I don’t really see why you’d want to reinvent the wheel and not use Twine. Unless you’re absolutely certain that Twine would be an actual hindrance to development, that it simply can’t do what you want it to do, etc., Twine will not only allow you to make your game multiplatform but should also speed up development significantly.
You could download a copy of no_one’s Fatty Text Adventure Game, open it up in Twine and sort of dig around in its guts if you want to get an idea of how it works. At the very least, it should give you a fair assessment of whether or not C++ will do a better job than Twine in doing what you want.
In the end, you do you. And welcome to the community.