用vc++里CArray类的奇怪问题

来源:互联网 发布:网络购物投诉电话 编辑:程序博客网 时间:2024/06/06 17:39

这两天使用vc++里的CArray类,用来存储从数据库读出的数据,用起来感觉比数组要方便多了.

今天突然遇到一个奇怪的问题。在自定义的类链表中加入类对像时,在加入链表后,很奇怪的改变了加入的动象原来的值。开始找了很长时间,不知道是什么原因把加入的对象改变了。

查了查msdn,没有看明白。

仔细阅读了CArray类定义,

And find the reason of the Carray.add() wrong. Because it call the sign opertor, and reload the function and write it not complete. So lead to the wrong.

原创粉丝点击