I have a question about advanced poiters. I know the basics of memory
managment and pointers. That a pointer points to a memory location. I
also have read that dynamic memory new is used for creating an array
that you don't know the size of the array at compile time. Still I see
pointers used in other ways. I can create object o; or object * o =
new object; What is the different from creating an object one way or
the other. I have used pointers:
obj{
member * pmemberr;
};
obj::obj(){
pmember = new member;
}
I have some books that deal with pointers but they give me are
simplistic and don't cover examples I see in other programs. If a good
explanition is dificult to give where can I look this up to get a
better idea how to use pointers.
managment and pointers. That a pointer points to a memory location. I
also have read that dynamic memory new is used for creating an array
that you don't know the size of the array at compile time. Still I see
pointers used in other ways. I can create object o; or object * o =
new object; What is the different from creating an object one way or
the other. I have used pointers:
obj{
member * pmemberr;
};
obj::obj(){
pmember = new member;
}
I have some books that deal with pointers but they give me are
simplistic and don't cover examples I see in other programs. If a good
explanition is dificult to give where can I look this up to get a
better idea how to use pointers.
Comment