memcpy的BUG
摘要: If the source and destination overlap, memcpy does not ensure that the original source bytes in the overlapping region are copied before being overwritten. Use memmove to handle overlapping regions
如果原始資料source和目的單元格destination(的地址)重復了。在重復區域的原始source的字節被覆蓋以前,memcpy不能保證這些區域被拷貝。使用memove來處理重復的區域。
閱讀全文
posted @
2008-10-15 10:31 黑色天使 閱讀(2713) |
評論 (5) 編輯
盡量使用C++風格的類型轉換
摘要: 載自《More Effecitve C++》
閱讀全文
posted @
2008-09-28 15:12 黑色天使 閱讀(248) |
評論 (0) 編輯