Thread: Hey guys..need help on pointers

  1. #1
    Registered User
    Join Date
    Jul 2008
    Posts
    13

    Thumbs down Hey guys..need help on pointers

    Im a noobie at programming at the moment. I know my loops,variable,couts, and all the other basic stuff.I have been doing great until....POINTERS!!!. As a stubborn guy that I am
    I refuse to go any further until I know what Pointers are used for,until I can make a
    program by myself of pointers.I been doing that for the past lessons but,man o man is
    pointers really something I cant understand. I have sen countless youtube videos tutorials,
    countless websites tutorials,and countless books, and i still dont get pointers. My question for ya is....Can ya give me Some descriptions about pointers ,how to use them,when to use them etc...because I really think Im not meant to know about pointers.


    PS. I use DEV C++ , also If ya know other good website tutorials please let me know=)

  2. #2
    Registered User
    Join Date
    Jan 2005
    Posts
    7,366
    There are quite a few threads here with the exact same question. Trying searching for some and reading through them, they might help you out.

    >> I refuse to go any further until I know what Pointers are used for
    Why? Pointers are important to understand, but there are many other things that are useful in C++ that might be more important. If you focus on those things and wait until you have a need to understand pointers, then you might do better understanding them at that point.

  3. #3
    Registered User
    Join Date
    Dec 2007
    Posts
    2,675

  4. #4
    Registered User
    Join Date
    Jul 2008
    Posts
    13
    Quote Originally Posted by Daved View Post
    There are quite a few threads here with the exact same question. Trying searching for some and reading through them, they might help you out.

    >> I refuse to go any further until I know what Pointers are used for
    Why? Pointers are important to understand, but there are many other things that are useful in C++ that might be more important. If you focus on those things and wait until you have a need to understand pointers, then you might do better understanding them at that point.
    Thats just how I am=/
    I cant handle it when I try to learn something and I quit it.
    Ive always been like that...I got it from my dad.

  5. #5
    Registered User
    Join Date
    Jul 2008
    Posts
    13
    Quote Originally Posted by rags_to_riches View Post
    Thanks for your advice but that just got me more confusedXD.
    Are Pointers good for anything? Or no point? No pun intended.

  6. #6
    The larch
    Join Date
    May 2006
    Posts
    3,573
    How do you let more than one part of the program share the same data (provided that there might not be any data at all)?
    How do you create an object that can outlive the scope where it was created (allocate memory dynamically)?
    How do you create an object if the derived type is not known until at runtime (e.g you don't know at compile time whether the program is going to create a Dog or a Cat)?

    Pointers are pretty much fundamental to programming in C++. It's just that you may not have learnt about situations where they are necessary.

    The first introduction usually indeed makes you say 'So what, why wouldn't I manipulate the original variable instead'. But that just demonstrates the concept.

    Code:
    #include <iostream>
    int main()
    {
        int n;
        int* p = &n;
        *p = 42;
        std::cout << n << '\n'; //Wow!
    }
    I might be wrong.

    Thank you, anon. You sure know how to recognize different types of trees from quite a long way away.
    Quoted more than 1000 times (I hope).

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Hey Guys... Sorry 4 the Great Inconvenience
    By thecrazycoerian in forum C++ Programming
    Replies: 1
    Last Post: 01-10-2004, 02:04 AM
  2. pointers, functions, parameters
    By sballew in forum C Programming
    Replies: 3
    Last Post: 11-11-2001, 10:33 PM
  3. Pointers pointers pointers....
    By G'n'R in forum C Programming
    Replies: 11
    Last Post: 11-02-2001, 02:02 AM
  4. Pointers pointers pointers...
    By SMurf in forum C Programming
    Replies: 8
    Last Post: 10-23-2001, 04:55 PM
  5. Hey Guys
    By D4050 in forum C Programming
    Replies: 0
    Last Post: 10-01-2001, 06:20 AM