Skip to content

Instantly share code, notes, and snippets.

@cztchoice
Created March 5, 2018 03:46
Show Gist options
  • Save cztchoice/19d2ef9e481ecae8daa0f27f2019d995 to your computer and use it in GitHub Desktop.
Save cztchoice/19d2ef9e481ecae8daa0f27f2019d995 to your computer and use it in GitHub Desktop.
C++ vector 查找并删除一个元素
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