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

>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.

> 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.

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

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 :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.