|
|
|
|
|
by nhaehnle
4484 days ago
|
|
Honestly, writing safe C++ code means just following a few rules of thumb. Most importantly: never do pointer arithmetic, always use smart pointers. Basically, 99% of your work should use only about 10% of the feature set of C++ explicitly. The vast majority of the time, you shouldn't even write templates (just use the ones in the STL and project-specific ones that make sense). But it's really nice that those other 90% of features are there when you need them. |
|
I rarely use smart pointers that aren't implementation details (private class members)