📜  如果不存在 C++ 向量推送 - C++ 代码示例

📅  最后修改于: 2022-03-11 14:44:50.411000             🧑  作者: Mango

代码示例1
std::vector name;

if (std::find(name.begin(), name.end(), someName) == name.end()) {
  // someName not in name, add it
  name.push_back(someName);
}