Help with pointers?

This is a discussion on Help with pointers? within the C++ Programming forums, part of the General Programming Boards category; I'm having issues learning these pointers.. what would you use them for? I don't get it......

  1. #1
    C++ and openGL Raeliean's Avatar
    Join Date
    Jul 2005
    Posts
    28

    Help with pointers?

    I'm having issues learning these pointers.. what would you use them for? I don't get it...
    Be inspired.

  2. #2
    myNegReal
    Join Date
    Jun 2005
    Posts
    100
    Lots of things, arrays, to have a little control over memory usage, edit objects passed into a function without the need to return, all kinds of things. Some people can probably list many more, I just can't think right now, it's also kinda hard thinking of all the things you use them for and then explain it to someone. Sorry, I'm incredibly tired lol

  3. #3
    Super Moderator
    Join Date
    Sep 2001
    Posts
    4,913
    Pointers hold memory addresses. Sometimes when you're dealing with large data structures and you need to send those structures to a function or something, it's a lot easier to send the location of the data structure, than the entire data structure itself.

  4. #4
    Registered User major_small's Avatar
    Join Date
    May 2003
    Posts
    2,787
    pointers also allow for dynamic memory allocation/deallocation... you'll learn about that in more detail when you get to learning about linked lists...
    Join is in our Unofficial Cprog IRC channel
    Server: irc.phoenixradio.org
    Channel: #Tech


    Team Cprog Folding@Home: Team #43476
    Download it Here
    Detailed Stats Here
    More Detailed Stats
    52 Members so far, are YOU a member?
    Current team score: 1223226 (ranked 374 of 45152)

    The CBoard team is doing better than 99.16% of the other teams
    Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)

    Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT

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. function pointers
    By benhaldor in forum C Programming
    Replies: 4
    Last Post: 08-19-2007, 10:56 AM
  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