/
niceSOFT
/
swig
Обзор
Документация
Войти
/
niceSOFT
/
swig
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
Examples/python/std_map/example.h
14 строк
344 B
Marcelo Matus
add std_map example
08 янв 2006, 10:00
08 янв 2006, 10:00
a80ac86
Код
Авторство
О чём код?
/* File : example.h */ #include <map> #include <string> template<class Key, class Value> std::map<Key,Value> half_map(const std::map<Key,Value>& v) { typedef typename std::map<Key,Value>::const_iterator iter; std::map<Key,Value> w; for (iter i = v.begin(); i != v.end(); ++i) { w[i->first] = (i->second)/2; } return w; }