C++ for each, pulling from vector elements
问题 I am trying to do a foreach on a vector of attacks, each attack has a unique ID say, 1-3. The class method takes the keyboard input of 1-3. I am trying to use a foreach to run through my elements in m_attack to see if the number matches, if it does... do something. The problem I'm seeing is this: a'for each' statement cannot operate on an expression of type "std::vector<Attack Am I going about this totally wrong, I have C# experience and is kind of what I'm basing this on, any help would be