This simple map example gives me the following error under MSVS .Net 2003:Code:#include <iostream> #include <map> using namespace std; int main() { map<string, float> name_weight; name_weight["manav"] = 62.5f; name_weight["khushi"] = 67.5f; for(map<string, float>::iterator it = name_weight.begin(); it != name_weight.end(); ++it) { cout << it->first << " weighs " << it->second << "Kg" << endl; } return 0; }
test4.cpp(14) : error C2679: binary '<<' : no operator found which takes a right-hand operand of type 'const std::string' (or there is no acceptable conversion)