User Profile
Collapse
-
Thanks a lot for the answer. I'll try it right away and let you know if it works. Regards -
Sorry and don't accuse me of flooding. I realized there was an error in my sample code -- I had been trying things out and I happen to send the wrong version (although it also crashes, even doing yet less than the one below). It should return
point[0] = ( 0 , 0 )
point[1] = ( 1 , 0 )
point[0] = ( 0 , 0 )
point[1] = ( 1 , 0 )
copypoint[0] = ( 49 , 0 )
copypoint[1] = ( 1 , 0 )
but the...Last edited by sicarie; Feb 27 '08, 02:06 PM. Reason: Code tags are [code=cpp] and after your code [/code]. Please use them. They want to be used. They like to be used.Leave a comment:
-
Copy on write (COW) smart pointers
What implemetation for a copy on write pointer do you recommend that I use, since it's not a completely standard thing? I found the link to http://code.axter.com/cow_ptr.h, used it, and it crashed. I am compiling with visual studio v8.0 without a glitch and I am starting to think I just didn't understand how to use the pointer. Below, I attach a simple program that crashed, but works fine with a copy pointer from http://code.axter.com/copy_ptr.h....Last edited by sicarie; Feb 27 '08, 02:05 PM. Reason: Code removed as it is updated later (and we ask that no full code be posted anyway...)
No activity results to display
Show More
Leave a comment: