編譯就不說了, 網上這方面的文章很多
********************************************
如果和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.