如何在 C++ v60 中实现 std:map?
how to achieve std:map in C++ v60?
我正在尝试在 C++ -V60 构建工具中实现字典类型操作。我在 C++ 中找到了 map 来替代 Dictionary 泛型类型。但是在尝试实现它时,我在声明地图变量时遇到了问题。
#include <iterator>
#include <map>
using namespace std;
int main()
{
// insert single values
map<int, int> m1;
}
错误:
'std::reverse_bidirectional_iterator<std::_Tree<int,std::pair<int const ,int>,std::map<int,int,std::less<int>,std::allocator<int> >::_Kfn,std::less<int>,std::allocator<int> >::const_iterator,std::pair<int const ,int>,std::pair<int const ,int> const &,std::pair<int const ,int> const *,int>' : identifier was truncated to '255' characters in the debug information
您必须在包含头文件之前禁用警告,例如
#pragma warning(disable: 4786)
警告 4786 是链接器警告,因此您在命令行中的开关列表中添加了类似 /IGNORE:4786 的内容
我正在尝试在 C++ -V60 构建工具中实现字典类型操作。我在 C++ 中找到了 map 来替代 Dictionary 泛型类型。但是在尝试实现它时,我在声明地图变量时遇到了问题。
#include <iterator>
#include <map>
using namespace std;
int main()
{
// insert single values
map<int, int> m1;
}
错误:
'std::reverse_bidirectional_iterator<std::_Tree<int,std::pair<int const ,int>,std::map<int,int,std::less<int>,std::allocator<int> >::_Kfn,std::less<int>,std::allocator<int> >::const_iterator,std::pair<int const ,int>,std::pair<int const ,int> const &,std::pair<int const ,int> const *,int>' : identifier was truncated to '255' characters in the debug information
您必须在包含头文件之前禁用警告,例如
#pragma warning(disable: 4786)
警告 4786 是链接器警告,因此您在命令行中的开关列表中添加了类似 /IGNORE:4786 的内容