0

There are two general comments about pointers

1. Pointers increase the efficiency of our programs

2. Pointers degrade reliability of C++ programs due to security
issues

Give your views on these comments

5
Contributors
4
Replies
5
Views
9 Years
Discussion Span
Last Post by oliver_mk
0

>1. Pointers increase the efficiency of our programs
They also decrease the efficiency of programs.

>2. Pointers degrade reliability of C++ programs due to security issues
Only if used improperly, just like any other language feature.

0

> 2. Pointers degrade reliability of C++ programs due to security issues
I try to only use pointers when necessary, if your not going to be accessing others parts of the memory from that pointer, then simply use references. This will also make the code more readable.

0

Allow me to introduce my version of The Pointer Manifesto:

1. Pointers increase the efficiency of my programs

2. Pointers improve reliability of my C++ programs due to its flexibility, natural semantics and paragraph #1 issues

0

If you use them properly they can increase the efficiency. If not sure how to use them, then use shared_ptr and you won't have any problems at all and your life will be much easier :)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.