Thursday, 21 March 2019

c++ - Should/can smart pointers normally be used?


Possible Duplicate:
What is a smart pointer and when should I use one?







I've recently read about smart pointer, such as shared_ptr or auto_ptr. Is it good/bad practice to prefer them over normal pointers?



E.g. should I use them in arguments to functions or when storing pointers as members of a class?

No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print ...