Easy Console Menu in C++
A header file with code for creating a console menu. The header contains 3 classes
1 of them is a struct but whatever
An item that can be added to a menu. Includes a name, a description, and an action to be run when the item is selected
The main class you'll be using. Includes a name and description like a
MenuItem, as well as some methods.
Adds a submenu to the menu.
Adds an item to the menu.
Works all the magic, allowing the user to navigate the menu.
A derived class of
Menu that adds an inline wrapper for the
@ANDREWVOSS No, it's just when you pass by value, you are creating a copy, which is expensive. Passing by const-ref doesn't create unnecessary copies which can hinder performance. You can read more here: https://stackoverflow.com/questions/4986341/where-should-i-prefer-pass-by-reference-or-pass-by-value