Hi all, I would like to know the best way to flip a boolean value to true from false. It is regarding an assignment I have for an introductory c plus plus course. The assignment requires us to create a simple console program that keeps track of two trucks in a business. I plan to use a boolean to keep track of the truck availability. bool avail1 for truck 1 and bool avail2 for truck 2
Feature #2: Truck Returned Home when the work is done,
the truck returns home. We want to use this feature to let the program
know that the truck is available for new work.
The above feature requires me to flip the boolean value upon user entry to true again. I could use "cin" to get the user entry but how do I use that to flip the boolean value. Is it even possible? Can someone explain? Thank you!