Created
March 5, 2018 03:46
-
-
Save cztchoice/19d2ef9e481ecae8daa0f27f2019d995 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