Discussion:
warning C4786: 'std::_Tree
(too old to reply)
v***@gmail.com
2012-10-09 04:57:12 UTC
Permalink
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,
Cholo Lennon
2012-10-09 19:21:35 UTC
Permalink
Post by v***@gmail.com
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,
See this: http://support.microsoft.com/kb/167355

Regards
--
Cholo Lennon
Bs.As.
ARG
Loading...