Friday, October 31, 2008

the copy constructor makes people crazy

in c++, it always copies those values. this makes the pointer management really tricky. just like the last month post, value is by default. when return value happens, means all the pointers to the old value are invalid. = -b this time, the object there're some self indexes structures. since each object will not share such structure, the structure is declared as objects also. to visit this structure, i also need to introduce some orders. the orders are maintained as pointers to the indexes structure. After 2 hours debug, i found when the copy happens, all the index structure orders becomes invalid. = -. T, T cxx

No comments:

Post a Comment