| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1199 人关注过本帖
标题:VS2005使用STLport问题
只看楼主 加入收藏
zwlsei
Rank: 1
等 级:新手上路
帖 子:10
专家分:0
注 册:2009-8-7
结帖率:50%
收藏
 问题点数:0 回复次数:0 
VS2005使用STLport问题

现有vs2005下使用的stlport的代码如下:
#ifdef WIN32
namespace stdext {
    template<>
    class hash_compare<MatchIndex> {
    public:
        static const size_t bucket_size = 4;
        static const size_t min_buckets = 8;
        size_t
        operator()(const MatchIndex &__x) const
        { return __x.first * 1529 + __x.second; }
        bool operator()(const MatchIndex &__x1, const MatchIndex &__x2) const {
            return (__x1.first < __x2.first) || (__x1.first == __x2.first && __x1.second < __x2.second);
        }
    };
}
但是编译时出现错误:error C2143: 语法错误 : 缺少“;”(在“<”的前面);
                    error C2913: 显式专用化;“stdext::hash_compare”不是类模板的专用化;
                      error C2059: 语法错误 : “<”;
                   error C2143: 语法错误 : 缺少“;”(在“{”的前面);
                  error C2447: “{”: 缺少函数标题(是否是老式的形式表?);
                  error C2039: “hash_map”: 不是“stdext”的成员
请问各位高手这是什么错误?怎么解决?
搜索更多相关主题的帖子: STLport 
2010-04-09 17:31
快速回复:VS2005使用STLport问题
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.011427 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved