Welcome to Dream.In.Code
Getting C++ Help is Easy!

Join 132,127 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 2,000 people online right now. Registration is fast and FREE... Join Now!




Pointers optional?

 
Reply to this topicStart new topic

Pointers optional?, Are pointers optional....

NelsonTT
post 7 Oct, 2008 - 04:34 PM
Post #1


New D.I.C Head

*
Joined: 5 Oct, 2008
Posts: 16


My Contributions


Are pointers optional because I don't understand them clearly. The tutorials are too not noob-friendly...

So:
  1. Are pointers optional in mosty programs?
  2. Do YOU know any noob-friendly tutorials on pointers?


Thanks in advance for taking your time and answering this~!
User is offlineProfile CardPM

Go to the top of the page

William_Wilson
post 7 Oct, 2008 - 05:26 PM
Post #2


lost in compilation

Group Icon
Joined: 23 Dec, 2005
Posts: 3,968



Thanked 13 times

Dream Kudos: 3275

Expert In: Java, C, Javascript

My Contributions


pointers can be optional, but you lose most of the dynamic usefulness of C++.

Pointers are not all that difficult, you simply need to treat them as a leash. The leash is attached to your dog, but you can attach it to any dog and you can hand the leash to another person. Now think of the leash as your pointer, and the dog is a variable, thus another friend would be a function of another pointer variable.
User is online!Profile CardPM

Go to the top of the page

demiserealized
post 7 Oct, 2008 - 05:54 PM
Post #3


New D.I.C Head

*
Joined: 11 Sep, 2008
Posts: 6

You can write useful program that don't use pointers but you pretty much lose anything OOP about c++ when you don't use them. The way you write certain classes to allow reuse, inheritance, and abstraction kind of require you to use them. Pointers themselves aren't too hard. The only problem is that they allow you to do so many cool, hard things that its kind of overwhelming learning them, because usually as soon as you're taught them, most instructions jump into said cool things you can do with them.
User is offlineProfile CardPM

Go to the top of the page

RedSonja
post 8 Oct, 2008 - 05:55 AM
Post #4


D.I.C Head

Group Icon
Joined: 4 Sep, 2008
Posts: 170



Thanked 3 times

Dream Kudos: 25
My Contributions


Or use Ada, every type is a pointer type, you don't have to think about it.

The analogy of the leash is perfect. Love it.


Actually, young Nelson, do try using pointers, it is tricky to start with but you can be proud of yourself when you have managed it. I confess I avoided them for years.
User is offlineProfile CardPM

Go to the top of the page

MorphiusFaydal
post 8 Oct, 2008 - 06:00 AM
Post #5


D.I.C Lover

Group Icon
Joined: 12 May, 2005
Posts: 1,085



Thanked 8 times

Expert In: Hardware, Networking

My Contributions


I found the cplusplus.com tutorial about pointers really helpful m'self.
User is offlineProfile CardPM

Go to the top of the page

Reply to this topicStart new topic
Time is now: 11/21/08 11:35AM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month