i cant uderstand!!!!
i cant uderstand!!!!
I suggest you write some @#$# lprograms and you'll experience that you can't without.
Pointer are very important especialy with classes and in windows programming.![]()
but what the point of the pinters...?
can any one give me an EX?
Imagine if you will, you have a class in your game that is very big. Let's say it takes up a few megs. Whenever you want to pass that class to a function to have something performed on it , if you DO NOT use pointers a copy of the class is made and then passed to the function. This is very slow and horrible for speed. Instead you could pass a pointer TO the class. A pointer is just something that points to a memory address so it is usually 4 Bytes. This way only the address is passed and you can directly modify the class.
"...the results are undefined, and we all know what "undefined" means: it means it works during development, it works during testing, and it blows up in your most important customers' faces." --Scott Meyers
polymorphism is achieved through a combination of inheritance and pointers.
the topic of pointers is very important in c/c++ programming, i used to wish that pointers have not existed back in the days of my c class i feared and hated it.
just learn it at a comfortable pace and u'll soon be using pointers as would terminate a statement with a ;.
Thax
i know how to use them
but i dont understand Y
so i'll learn more
thanx