Pointers suck when not wrapped in smart pointers
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++:No, I do believe it can do it, but I don't know how or when.
Named Return Value Optimization in Visual C++ 2005
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)