I have to use a smart pointer and I found "shared_ptr" from boost looks good. I downloaded the boost library and I can see many files and libraries there. Is there any way to use only the shared_ptr ?
3 Answers
boost bcp is your friend. It allows extracting individual boost libraries out of its tree. I used it with success in the past. shared_ptr consists only of headers, so that will be especially good for you.
Comments
If you're using a recent version of Visual C++ on Windows, BoostPro provides a convenient free installer here: http://www.boostpro.com/products/free.
Otherwise, or if you have already downloaded the source distribution, you should in fact be able to start using shared_ptr and friends right away as the shared_ptr library is "header-only" -- no compilation of .cpp files is required.