vksath...@gmail.com
unread,Oct 9, 2012, 12:57:12 AM10/9/12You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Hi,
am using vc 6.0 on windows 7 while using map its show 100 warnings in the program
this is my code.
#include "stdafx.h"
#include "Test.h"
#include <windows.h>
#include <string>
#include <iostream>
#include <utility>
#include <fstream>
#include <list>
#include <map>
#pragma warning (disable : 4786)
using namespace std;
int main(int argc, char *argv[])
{
map<string, string> strMap;
strMap["Monday"] = "MD";
strMap["Tuesday"] = "TD";
strMap["Wednesday"] = "WD";
strMap["Thursday"] = "THD";
strMap["Friday"] = "FD";
strMap["Saturday"] = "SD";
strMap.insert(pair<string, string>("Sunday", "SUD"));
strMap["Sunday"] = "SUN";
string found_val;
map<string, string>::iterator it = strMap.find("Monday");
if( it != strMap.end() )
{
found_val = it->second;
cout<<"\n\nFound : "<<found_val;
found_val.append("-NewValue");
strMap["Monday"] = found_val;
}
else
cout << "Key not found!\n";
for (map<string, string>::iterator p = strMap.begin( );
p != strMap.end( ); ++p ) {
cout << "English: " << p->first<< ", #: " << p->second << endl;
}
return 0;
}
thanks,