More about pointers

This is a discussion on More about pointers within the C++ Programming forums, part of the General Programming Boards category; What does it mean to do this: int* Pointer; instead of int *Pointer; or (*int)(*Pointer) And is something like **Pointer ...

  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,211
    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, 06:08 PM
  3. Request for comments
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 01-02-2004, 09:33 AM
  4. Staticly Bound Member Function Pointers
    By Polymorphic OOP in forum C++ Programming
    Replies: 29
    Last Post: 11-28-2002, 12:18 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21