woaidongmao

文章均收录自他人博客,但不喜标题前加-[转贴],因其丑陋,见谅!~
随笔 - 1469, 文章 - 0, 评论 - 661, 引用 - 0
数据加载中……

VC6中使用STLPort4.6.2

编译就不说了, 网上这方面的文章很多

********************************************
如果和PlatformSDK 一起使用的话
要记的在STLport目录中 \stlport\stl_user_config.h 文件中
把这一句打开

     # define _STLP_NEW_PLATFORM_SDK 1

否则在编译时会有如下错误
second C linkage of overloaded function 'InterlockedIncrement' not allowed

********************************************

如果想静态链接 STLPort 请在VC6的 C/C++ \ General \ Preprocessor definitions
中添加宏 _STLP_USE_STATIC_LIB

********************************************

对於使用IOSTREAM的, 如果有问题
在STLport目录中 \stlport\stl_user_config.h 文件中
把这一句打开吧

    # define _STLP_NO_IOSTREAMS 1

********************************************

- When you erase an element from a hash_map only iterators to the erased element are invalidated
  so you can write something like:

while (it != myHashMap.end()) {
if (condition)
myHashMap.erase(it++); //这里为何这样不出错 而把it++放外面就不行呢
    //在外面是对删除后的无效指针加, 而里面是对有效指针加
else
++it;
}

  To finish STLport has a special debug mode to check such bad construction. Check the
  stl_user_config.h file in the stlport folder for that, the macro is _STLP_DEBUG.

posted on 2008-05-07 10:53 肥仔 阅读(639) 评论(0)  编辑 收藏 引用 所属分类: Boost & STL


只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理