#include <stdio.h>
#include <stdint.h>
#include <vector>
#include <list>
#include <map> template<typename T>
void Dump(const T &s)
{
for (T::const_iterator it = s.begin(); it != s.end(); ++it)
{
printf("%d ", *it);
}
printf("\n");
} void DelVector()
{
std::vector<int32_t> vec{ , , , , , , , , };
Dump(vec);
for (auto it = vec.begin(); it != vec.end();)
{
if (*it % == )
{
it = vec.erase(it);
}
else
{
++it;
}
}
Dump(vec);
} void DelList()
{
std::list<int32_t> ls{ , , , , , , , , };
Dump(ls);
for (auto it = ls.begin(); it != ls.end();)
{
if (*it % == )
{
it = ls.erase(it);
}
else
{
++it;
}
}
Dump(ls);
} void DelMap()
{
std::map<int32_t, int32_t> map{ { , }, { , }, { , }, { , }, { , }, { , }, { , }, { , }, { , } };
Dump(map);
for (auto it = map.begin(); it != map.end();)
{
if (it->first % == )
{
it = map.erase(it);
}
else
{
++it;
}
}
Dump(map);
} int32_t main()
{
DelVector();
DelList();
DelMap();
getchar();
return ;
}