To-Do List Application Gaming Project in C++

Explanation

  1. Menu Display:
    • displayMenu(): This function displays the main menu options: adding a task, removing a task, listing all tasks, and exiting the application.
  2. Adding a Task:
    • addTask(): This function prompts the user to enter a task description and adds it to the tasks vector. The cin.ignore() is used to clear the newline character left in the input buffer from previous operations.
  3. Removing a Task:
    • removeTask(): This function asks the user for the task number to remove. It checks if the provided number is valid and, if so, removes the task from the tasks vector. The task numbers are 1-based, so the index is adjusted accordingly.
  4. Listing All Tasks:
    • listTasks(): This function displays all current tasks in the tasks vector. If there are no tasks, it informs the user.
  5. Main Function:
    • The main() function controls the application flow, continuously displaying the menu and handling user choices until the user chooses to exit.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top