The following code compiles fine in Visual C++ 2003 but not in 2005
using namespace std;
string name, value;
name = "foo";
value = "bar";
map<string, string> m;
m.insert(pair <string, string> (name, value));
Did something change or am I doing something wrong?
Thank you.
This code compiles fine in VC2003 and VC2005. Did you forget the #includes ?
It's generally much easier to help if you report what errors you are getting...
[code]
#include "stdafx.h"
#include <map>
#include <string>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
string name, value;
name = "foo";
value = "bar";
map<string, string> m;
m.insert(pair <string, string> (name, value));
return 0;
}
[/code]
using namespace std;
string name, value;
name = "foo";
value = "bar";
map<string, string> m;
m.insert(pair <string, string> (name, value));
Did something change or am I doing something wrong?
Thank you.
This code compiles fine in VC2003 and VC2005. Did you forget the #includes ?
It's generally much easier to help if you report what errors you are getting...
[code]
#include "stdafx.h"
#include <map>
#include <string>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
string name, value;
name = "foo";
value = "bar";
map<string, string> m;
m.insert(pair <string, string> (name, value));
return 0;
}
[/code]
'Native > C++' 카테고리의 다른 글
md5 checksum MD5 (0) | 2013.10.02 |
---|---|
pcre (0) | 2013.10.02 |
CJpeglibExtension (0) | 2013.10.02 |
library 만들기 (0) | 2013.10.02 |
error msg (0) | 2013.10.02 |