Thread: Questions

  1. #1
    Registered User
    Join Date
    Aug 2006
    Posts
    11

    Question Questions

    hi i need some help, i'm basically a new C++ programmer so i had some questions:

    -whats the use of * pointer (the difference of int x and int *x?)

    -whats should i need to study in order to be a great programmer in this language

    thanks

  2. #2
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,079
    Quote Originally Posted by noyram08
    -whats the use of * pointer (the difference of int x and int *x?)
    The former holds an integer, the latter holds the address of an integer. Look up pointers.
    Quote Originally Posted by noyram08
    -whats should i need to study in order to be a great programmer in this language
    Everything.
    Sent from my iPadŽ

  3. #3
    The superhaterodyne twomers's Avatar
    Join Date
    Dec 2005
    Location
    Ireland
    Posts
    2,273
    If you're confused about pointers, I'd recommend looking into this. It's done in C, but it's readable if you only know C++

  4. #4
    Hardware Engineer
    Join Date
    Sep 2001
    Posts
    1,398
    -whats should i need to study in order to be a great programmer in this language
    It's a long-long road from beginner to greatness... I often compare learning to program to learning to play a musical instrument. You can learn a few guitar chords in a week, but it's going to take a year before you can impress your friends.

    So, start out with a good beginning book, or sign-up for a class if possible. Take a look through the Book Recommendations.

    On your path to greatness...
    The Thinking In C++ books are good, and everybody needs The C++ Programming Language, by Bjarne Stroustrup. (You don't really need it, it's just cool because Stroustrup is the "creator" of C++ !!!!)

    It wouldn't hurt to get a copy of the ANSI/ISO C++ Language Standard, and the C Language Standard.

  5. #5
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >It wouldn't hurt to get a copy of the ANSI/ISO C++ Language Standard, and the C Language Standard.
    Though if you don't understand it, keep in mind that nobody else does either.
    My best code is written with the delete key.

  6. #6
    Registered User
    Join Date
    Aug 2006
    Location
    Silale, Lithuania
    Posts
    3
    This page helped me a lot when I first got confused with pointers. Hope it helps!
    Last edited by mcpunky; 08-18-2006 at 03:27 AM.

  7. #7
    Registered User
    Join Date
    Aug 2006
    Posts
    11
    thanks alot guys i'm learning a lot this few days )

  8. #8
    Registered User
    Join Date
    Aug 2006
    Posts
    11
    um a question though, we have an assignment which is to create a tree which has a maximum of 5 levels and 3 children and it must be able to traverse preorder, postorder, and the two other orders(^^ which i forgot) and i want to ask should i do (i'm thinking of using a stack or node is making this program)

  9. #9
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >create a tree which has a maximum of 5 levels and 3 children
    Aroo?

    >traverse preorder, postorder, and the two other orders(^^ which i forgot)
    Probably inorder and level order.

    >and i want to ask should i do
    You have two choices, basically. You can use an array and simulate tree operations with index arithmetic (the maximum size restriction suggests this one), or you can do a more general linked tree.
    My best code is written with the delete key.

  10. #10
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,079
    Is this the same person who was asking what a pointer was a week ago?
    Sent from my iPadŽ

  11. #11
    The superhaterodyne twomers's Avatar
    Join Date
    Dec 2005
    Location
    Ireland
    Posts
    2,273
    I know, seems like a large step, IMO.

    >> basically a new C++ programmer

  12. #12
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    It's a not so novel approach to homework questions.

    "What is an int? Oh, and by the way, how can I create a linked list to traverse a tree?"
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  13. #13
    The superhaterodyne twomers's Avatar
    Join Date
    Dec 2005
    Location
    Ireland
    Posts
    2,273
    The art of asking one thing, but meaning another, perhaps. Kinda the opposite of asking your parents if you can get a Ferrari for your 17th birthday, then when (not if), they say 'no', asking for a 89 ford.

  14. #14
    Registered User
    Join Date
    Aug 2006
    Posts
    11
    sorry for that sudden quick change of question ^^

  15. #15
    Registered User
    Join Date
    Aug 2006
    Posts
    11
    i'm just wondering what is faster to use in that problem, an array or linked list ^^

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. questions....so many questions about random numbers....
    By face_master in forum C++ Programming
    Replies: 2
    Last Post: 07-30-2009, 08:47 AM
  2. A very long list of questions... maybe to long...
    By Ravens'sWrath in forum C Programming
    Replies: 16
    Last Post: 05-16-2007, 05:36 AM
  3. Several Questions, main one is about protected memory
    By Tron 9000 in forum C Programming
    Replies: 3
    Last Post: 06-02-2005, 07:42 AM
  4. Trivial questions - what to do?
    By Aerie in forum A Brief History of Cprogramming.com
    Replies: 23
    Last Post: 12-26-2004, 09:44 AM
  5. questions questions questions.....
    By mfc2themax in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 08-14-2001, 07:22 AM