Results 1 to 4 of 4

Thread: pointers

  1. #1


    hello guys,
    I want to know the difference between pointer and reference. Are these similar or not. Please explain me.



  2. #2
    Senior Member
    Join Date
    Jul 2002
    Pointer and reference are similar in some ways while they are really different. It's really not easy to explain the difference but I will see if I can clarify for you.

    Pointers can be used to create link lists, stacks etc but reference can't. You can de-reference a pointer. Well reference is an address whilst a pointer points to an address. So I guess what am trying to say is that a pointer can be treated as a reference but a reference can't be treated like a pointer.

    I hope that helps.

    - The mind is too beautiful to waste...

  3. #3
    Senior Member
    Join Date
    May 2002
    read this tut if you want to learn how pointers work:
    Support your right to arm bears.

    ^^This was the first video game which i played on an old win3.1 box

  4. #4
    I guess cutty said it best when you talk about a reference you're talking about an specific space in memory where something is, the adress to it. Whereas a pointer is something that points to somewhere in memory, you usually assign this refrences to pinters. I recommend you reading about pointers for they are a little bit tricky at first but a very useful tool later on when dealing with dynamic memory specially.
    I Speak in frequencies even dogs have trouble hearing

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts