Skip to content

Instantly share code, notes, and snippets.

@cztchoice
Created March 5, 2018 03:46
Show Gist options
  • Save cztchoice/91a851dd04c45e66329d01d2603f3080 to your computer and use it in GitHub Desktop.
Save cztchoice/91a851dd04c45e66329d01d2603f3080 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