Site Statistics
 
Threads: 4,038
Posts: 17,686
Members: 3,037
Users Online: 15
Newest Member: David.beckerham


Go Back   PC101 > Computer Related Forums > Software > Software Development

Software Development Programming / Databases = C & C++, SQL & PL/SQL, Java Help and more!


Reply
 
LinkBack Thread Tools Display Modes
Old 11-20-2006, 06:24 AM   #1
Freshman
 
Join Date: Oct 2006
Posts: 12
Rep Power: 0 rajadurai is on a distinguished road
Pointer to Pointer concept

Hello,

I have worked in C but not on pointers, but now I have to work completely in pointer concepts, that is, pointers to pointers, pointers to structures, etc. Can you anyone please suggest me good material to go through? I am searching and I have got few with me.

If anyone can suggest me, I would be happy.

with regards
Rajadurai
rajadurai is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-20-2006, 10:44 AM   #2
Professor
 
Join Date: Jul 2005
Posts: 2,208
Rep Power: 6 Will.Spencer is on a distinguished road
Quote:
Originally Posted by rajadurai View Post
I have worked in C but not on pointers, but now I have to work completely in pointer concepts, that is, pointers to pointers, pointers to structures, etc.
You have my sympathy. Pointers make most peoples heads hurt.

Quote:
Originally Posted by rajadurai View Post
Can you anyone please suggest me good material to go through?
Pointers are simple, in theory. Any good book on C programming will tell you all you need to know about pointers.

Looking through my bookshelf, I see a good explanation of pointers in Practical C Programming by Steve Oualline.

Pointers on C is an entire book devoted to C pointers. I don't have that on my bookshelf, so I can't tell you how good it is.

On the web, take a look at:

It is in practice where pointers become complex. Humans appear to have difficulty keeping track of what is a thing and what is a pointer and where each pointer points to.

My advice is this:
  • Use a naming standard for your pointers, such as appending "_ptr" to every pointer.
  • Document your variables, including pointers. Comment heavily.
Will.Spencer is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-23-2006, 03:02 AM   #3
Junior
 
Join Date: Mar 2006
Posts: 176
Rep Power: 3 eeeboy is on a distinguished road
From my experience , Pointer is very hard to use at beginning . But once you start to understand the concept , the whole thing is very interesting. You can look at the chapter of pointer written by Kernighan-Ritchie , specially a code about how malloc works.
eeeboy is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-07-2007, 08:16 AM   #4
Sophomore
 
Join Date: Feb 2007
Posts: 30
Rep Power: 0 Vyoma is on a distinguished road
I find that pointers are easy - but that may be due to the effects of occupational hazzard. :P

Anyway, just remember that pointer is a variable that holds the address of something. If you remember that, then it should be easy when you feel that your brain is going down the hill.

Now I feel like explainging a bit more:
What is a pointer to a pointer?
A pointer to a pointer holds the address of the place, where there is another address. It is as smiple as that. (Pardon me if I made it complex).

A pointer is more like the clue in a treasure hunt game. Pointer is a clue (or more a definite clue), that leads you to the treasure - the value which may or may not have an identifier associated with it.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
at
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Last edited by Vyoma; 03-07-2007 at 08:17 AM. Reason: Missed the ')'
Vyoma is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-07-2007, 05:23 PM   #5
Head Mistress
 
Lyte's Avatar
 
Join Date: Oct 2005
Location: Good ol' U.S. of A
Posts: 3,448
Rep Power: 6 Lyte is on a distinguished road
Send a message via MSN to Lyte Send a message via Yahoo to Lyte Send a message via Skype™ to Lyte
Ya know, this is all greek to me but I still enjoy reading it! lol

Lyte
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Lyte is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Is your mouse pointer "drifting"? Rosetta Tutorials and How-To... 4 06-09-2006 12:55 AM



All times are GMT -5. The time now is 10:04 AM.

Powered by vBulletin Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC5