#include "Map.h" #include #include #include #include //std::string& to_lower(std::string& str) //{ // std::for_each(str.begin(), str.end(), ::tolower); // return str; //} struct LessIgnoreCase { inline bool operator()(const std::string& v1, const std::string& v2) { const char* str1 = v1.c_str(); const char* str2 = v2.c_str(); for ( ; *str1 && *str2 && ::tolower(*str1) == ::tolower(*str2); ++str1, ++str2 ) ; return ::tolower(*str1) < ::tolower(*str2); } }; int main() { //typedef ecci::Map> VariableValue; typedef ecci::Map VariableValue; VariableValue variableValues; std::string variableName; double value; while ( std::cin >> variableName >> value ) variableValues.insert(variableName, value); for ( typename VariableValue::ConstIterator itr = variableValues.constBegin(); itr != variableValues.constEnd(); ++itr ) std::cout << itr.getKey() << '=' << itr.getValue() << '\n'; }