How to Check a Variable Within a Class?
I’m just starting to learn about C++ classes, and I had a question regarding how to check a variable for each object without cycling through them using if-statements. Here is my code: #include <iostream> using namespace std; string ans; class Weapon { public: string name; int damage; bool isCurrentWeapon; public: Weapon(string n, int d, bool… Read More How to Check a Variable Within a Class?