Created
March 5, 2018 03:46
-
-
Save cztchoice/cd64197c1df7e31c36c6cc43ca17f13c to your computer and use it in GitHub Desktop.
C++ vector 查找并删除一个元素
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
auto iter = std::find(m_mainFormList.begin(), m_mainFormList.end(), form); | |
if (iter != m_mainFormList.end()) | |
{ | |
m_mainFormList.erase(iter); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment