Projects Inventory

Simple CRUD Application with GUI Gaming Project in C++

Explanation

  1. Dependencies:
    • This program uses the SFML library for creating the graphical user interface (GUI). Ensure you have SFML
      Advertisement
      installed and properly linked in your project.
  2. Item Structure:
    • Item struct holds the name and graphical representation (shape) of an item.
  3. Draw Items Function:
    • drawItems(RenderWindow& window, const vector<Item>& items)
      Advertisement
      : Clears the window and draws all items from the vector.
  4. Main Function:
    • Initialization: Sets up the SFML window and font.
    • Event Handling: Checks for user inputs to perform CRUD operations.
      • Add Item (A key): Creates a new item with a green rectangle shape and adds it to the list.
      • Remove Item (R key): Removes the most recently added item.
      • Update Item (U key): Changes the color of the most recently added item to red.
      • Display Items (D key): Shows the names of all items in the window.
  5. Running the Application:
    • The application continues to run until the window is closed. During runtime, pressing the keys will add, remove, update, or display items as specified.

Note:

Exit mobile version