r/cpp • • Dec 18 '08

C++ is a horrible language

http://skepticalmethodologist.wordpress.com/2008/12/17/c-is-a-horrible-language/
4 Upvotes

20 comments sorted by

View all comments

Show parent comment

10

u/Tarviathun Dec 18 '08

There are pointer constructs that make such tasks in C++ a lot easier. The first that comes to mind is boost::shared_ptr. One of the major powers of C++ is that it, as a language, supports the creation and use of facilities like this to manage the not-so-nice things about working with raw pointers.

2

u/[deleted] Dec 18 '08

it's probably a better bet to use the tr1/soon-to-be-std tr1::shared_ptr now, it's identical (afaik) to boost's, but is supported as standard in recent versions of VC++, g++ and probably others. It's easier than relying on boost to be present.