Thread: pointers

  1. #1


    Does anyone know a good place to find examples and an explanation to learn pointers? I have looked through several posts, books, and online and can't find a good beginner's explanation with examples. All I know about pointers is
    for example:

    int number;
    int *p;
    p = &number;

    I don't know how with characters though because with characters you have to give it storage like char this[15];

    Can anyone offer something that might help, whether it be your example & explanation, a book, or somewhere online..any suggestions? Thank you.

  2. #2
    Super Moderator
    Join Date
    Sep 2001
    Use this sites tutorials. They're usualy pretty good. Bascially, a pointer is just an address. You know that, but here's why. If you need to pass a whole array to a function, it's hard. So you pass the pointer, initialized to the first element. Then to get the next part, you just use pointername++, to increment it to the next spot in memory. It's a broad subject with dereferincing and all, so try and ask specific questions.

  3. #3
    There is a fellow named Marshal Brain that has a site called How Stuff Works. It has a section on C, which includes discussions of pointers. I found it to be good and you can find it at:

  4. #4
    Im back! shaik786's Avatar
    Join Date
    Jun 2002
    Bangalore, India

  5. #5
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe

  6. #6
    Thanks a lot everybody. It's a lot of help :-)

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. MergeSort with array of pointers
    By lionheart in forum C Programming
    Replies: 18
    Last Post: 08-01-2008, 10:23 AM
  2. Using pointers to pointers
    By steve1_rm in forum C Programming
    Replies: 18
    Last Post: 05-29-2008, 05:59 AM
  3. Request for comments
    By Prelude in forum A Brief History of
    Replies: 15
    Last Post: 01-02-2004, 10:33 AM
  4. Staticly Bound Member Function Pointers
    By Polymorphic OOP in forum C++ Programming
    Replies: 29
    Last Post: 11-28-2002, 01:18 PM