2008年4月28日 星期一

__GSHandlerCheck

舊的VS2005 project重新compile發生以下錯誤:
error LNK2001: unresolved external symbol __GSHandlerCheck

把C/C++ /Code Generation的Buffer Security Check設成no (/GS-)

詳細看:

2008年4月16日 星期三

pow() 和log10()在Visual Studio 2005有C2668的error

程式專案用Visual Studio 2005開時, 會發生以下錯誤訊息

error C2668: 'pow' : ambiguous call to overloaded function

MSDN說: 在Visual C++ 2005, pow(int, int)不支援重載了,要把第一個參數轉換(cast)成double, float, 或是long double

log10也是一樣, 原本log10(j)要改成
log10( static_cast(j))