It is best to avoid using pointers in C++ as much as possible. The use of pointers can lead to confusion of ownership which can directly or indirectly lead to memory leaks. Even if object ownership is well managed simple (and difficult to find) bugs can also lead to memory leaks.
Security Risks
Also, by avoiding the use of pointers we can avoid and sometimes eliminate common security holes such as buffer overruns. See the last example for more information about this.
Examples
Common instances were pointer usage can be avoided:
Recent comments
1 day 15 hours ago
5 days 11 hours ago
5 days 11 hours ago
6 days 7 hours ago
1 week 4 days ago
1 week 4 days ago
2 weeks 3 days ago
9 weeks 6 days ago
14 weeks 1 hour ago
16 weeks 5 days ago