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
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
The former holds an integer, the latter holds the address of an integer. Look up pointers.Originally Posted by noyram08
Everything.Originally Posted by noyram08
Sent from my iPadŽ
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++
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.-whats should i need to study in order to be a great programmer in this language
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.
>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.
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.
thanks alot guys i'm learning a lot this few days )
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)
>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.
Is this the same person who was asking what a pointer was a week ago?
Sent from my iPadŽ
I know, seems like a large step, IMO.
>> basically a new C++ programmer
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.
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.
sorry for that sudden quick change of question ^^
i'm just wondering what is faster to use in that problem, an array or linked list ^^