Thread: More about pointers

  1. #1
    Registered User
    Join Date
    May 2008
    Posts
    141

    More about pointers

    What does it mean to do this:

    int* Pointer;
    instead of
    int *Pointer;


    or (*int)(*Pointer)

    And is something like
    **Pointer
    like a pointer into another pointer

  2. #2
    Deathray Engineer MacGyver's Avatar
    Join Date
    Mar 2007
    Posts
    3,210
    Quote Originally Posted by bobbelPoP View Post
    What does it mean to do this:

    int* Pointer;
    instead of
    int *Pointer;
    Nothing, although the latter is possibly better practice if you're going to declare multiple variables on the same line.

    Quote Originally Posted by bobbelPoP View Post
    or (*int)(*Pointer)
    Non-sensical. You might be trying to cast *Pointer to type int * in the C-style manner of casting, but that isn't the way to do it.

    Quote Originally Posted by bobbelPoP View Post
    And is something like
    **Pointer
    like a pointer into another pointer
    Declared as "int **Pointer", Pointer would be a pointer to a pointer to an integer.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Using pointers to pointers
    By steve1_rm in forum C Programming
    Replies: 18
    Last Post: 05-29-2008, 05:59 AM
  2. Replies: 4
    Last Post: 12-10-2006, 07:08 PM
  3. Request for comments
    By Prelude in forum A Brief History of Cprogramming.com
    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