It took me a long, long time to realize that pointers suck. Maybe there is hope for you.
Pointers suck when not wrapped in smart pointers :p
That's my experience. Most of the "access violation" I get is with complex, non-C++ish code, such as managing buffers and pointers by hand (which I do avoid).
Mostly it's old code, written many years ago or so. We improve all the time!
This may be applicable to you, though it pertains to the 2005 version of Visual C++:Quote:
No, I do believe it can do it, but I don't know how or when.
Named Return Value Optimization in Visual C++ 2005