VC.STL Newsgroup Good Questions(二)
来源:互联网 发布:大本升级数据 编辑:程序博客网 时间:2024/05/04 04:05
VC.STL Newsgroup Good Questions(二)
使用Templated Member Function时C2664编译错误,Why?
Article last modified on 2002-5-29
----------------------------------------------------------------
The information in this article applies to:
- Microsoft Visual C++, 32-bit Editions, version 6.0, SP5
----------------------------------------------------------------
Question:
下面的代码编译时报告C2664错误: Error C2664: '__thiscall std::list 代码如下: istream_iterator list |
Answer:
当VC6的库文件刚发布的时候,编译器还不支持Templated Member Function。这样,Templated List Constructor无法得到Non-List Iterators。 现在编译器虽然支持Templated Member Function,但要想编译通过,你还是需要一个新的标准库。前面的代码应该在以下环境中可以编译通过: n VC 7 n VC6 with Dinkumware library upgrade n VC6 with STLport 如果你没有这样的编译环境,那还是不要使用Templated Member Function。你可以这么做:
istream_iterator list copy(intFileBegin,intFileEnd,back_inserter(intList)); 这样同样可以把istream中的东西导入到list中。 |
(To be Continued)
Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=12674
- VC.STL Newsgroup Good Questions(二)
- VC.STL Newsgroup Good Questions(二)
- VC.STL Newsgroup Good Questions(二)
- VC.STL Newsgroup Good Questions(二)
- VC.STL Newsgroup Good Questions(二)
- VC.STL Newsgroup Good Questions(一)
- VC.STL Newsgroup Good Questions(三)
- VC.STL Newsgroup Good Questions(一)
- VC.STL Newsgroup Good Questions(三)
- VC.STL Newsgroup Good Questions(三)
- VC.STL Newsgroup Good Questions(一)
- VC.STL Newsgroup Good Questions(一)
- VC.STL Newsgroup Good Questions(三)
- VC.STL Newsgroup Good Questions(三)
- VC.STL Newsgroup Good Questions(一)
- good c questions!
- good material for STL
- STL(shipped with VC6) Questions & Answers(四)
- 充分挖掘你的VC++ Debugger的潜能(一)
- 学习笔记《实战Linux Socket编程》第三章 地址转换函数
- 安装SQL Server2K可能引发一个严重问题
- STL Container和ATL智能包裹类的冲突
- [收藏]一个广为流传的关于项目管理的通俗讲解
- VC.STL Newsgroup Good Questions(二)
- 【新媒体讨论】动嘴不如动手
- VC.STL Newsgroup Good Questions(三)
- 调试Windows Media SDK时出现的异常中断
- 充分挖掘你的VC++ IDE的潜能(四)
- 魔鬼的细节 1/2
- 要玩命的做芯片!
- SMTP典型错误:“550 5.7.1 Uable to relay user@domain.com”的研究
- 充分挖掘你的VC++ IDE的潜能(三)