VC下关于map容器类引起的问题?
2008-10-21 18:09
387 查看
今天解码工作中增加一个CAtomDicti类,它封装了一个
private:
map<string, CAtom *> m_mapDicti;
的数据成员,但是编译的时候VC下出现了一大堆C4786的警告,我查机子上的msdn, 索引 ---> 查找:
输入
C4786,结果查到的是C4788,我晕,我还看了十来分钟那个警告,后来才发现不是同一个警告,后来上
msdn online查,查到了原因:
http://support.microsoft.com/kb/195386/zh-cn
不看机器翻译的中文,简直翻译得一窍不能。看下面的英文原文:
点击这里察看该文章的英文版: 195386
http://support.microsoft.com/kb/195386/en-us/
你可以看到这样一句:
In Visual C++ 5.0, using the following
C4786:'identifier' : identifier was truncated to 'number' characters in the debug information. However, this method does not disable all such warnings in Visual C++ version 6.0. The occurrence of many C4786 warnings may result in the following:
C1033 error: cannot open program database 'vc60.pdb'. Use the pragma directive before you include any STL headers to disable the warnings.
因此,你照文中所言的:在STL模板类的头文件之前加上一句:
#pragma warning (disable : 4786)
就大功告成了。
呵呵,还是要耐心看英文才能解决问题啊?
实际上我是在google上搜: map C4786
结果搜到了以下文章,http://blog.chinaunix.net/u1/43391/showart_430055.html
才认识到是自己没有认真看 msdn 的后果。555555555555
private:
map<string, CAtom *> m_mapDicti;
的数据成员,但是编译的时候VC下出现了一大堆C4786的警告,我查机子上的msdn, 索引 ---> 查找:
输入
C4786,结果查到的是C4788,我晕,我还看了十来分钟那个警告,后来才发现不是同一个警告,后来上
msdn online查,查到了原因:
http://support.microsoft.com/kb/195386/zh-cn
不看机器翻译的中文,简直翻译得一窍不能。看下面的英文原文:
点击这里察看该文章的英文版: 195386
http://support.microsoft.com/kb/195386/en-us/
你可以看到这样一句:
RESOLUTION
loadTOCNode(1, 'resolution');In Visual C++ 5.0, using the following
#pragma warning (disable : 4786)after including STL headers, disables the warning:
C4786:'identifier' : identifier was truncated to 'number' characters in the debug information. However, this method does not disable all such warnings in Visual C++ version 6.0. The occurrence of many C4786 warnings may result in the following:
C1033 error: cannot open program database 'vc60.pdb'. Use the pragma directive before you include any STL headers to disable the warnings.
因此,你照文中所言的:在STL模板类的头文件之前加上一句:
#pragma warning (disable : 4786)
就大功告成了。
呵呵,还是要耐心看英文才能解决问题啊?
实际上我是在google上搜: map C4786
结果搜到了以下文章,http://blog.chinaunix.net/u1/43391/showart_430055.html
才认识到是自己没有认真看 msdn 的后果。555555555555
相关文章推荐
- 关于容器Map删除元素的常见问题
- 关于vc++ 2005 发布程序的问题
- 关于使用position: relative引起的遮挡问题
- VC中一个关于宏的使用问题,字符串之间转换,宽字符与普通字符
- JAVA中关于Map的九大问题
- (来自百度知道)c/c++ VC++ MFC 关于在Static 控件里面作图的问题 详见问题补充,希望能留下QQ,交流一下
- 关于JAVA MAP中经常遇到的一些问题及解决方法
- 关于窗口与按钮焦点引起的KeyListnere失效的问题
- 关于Adobe Flash 11.3 引起的火狐使用问题
- 关于VC调用Matlab的问题
- 关于map容器的元素被无参初始化
- 【转】VC下关于debug和release的不同的问题总结
- 关于 vc编译程序 脱离 vc环境运行的问题 (新手)
- 关于vc中Listbox 无法排序问题
- 关于map中含数字string的排序问题
- Map拷贝 关于对象深拷贝 浅拷贝的问题
- VC++中关于字节对齐的问题
- 关于容器的用法(vector,deque,list,set,map etc.)
- Java中关于Map对象中改变Key值的问题
- STL中关于map和set的四个问题?