What n where is the strongest use of pointers???????
PointersWhere is the strongest use of pointers????
Page 1 of 1
3 Replies - 374 Views - Last Post: 08 October 2009 - 11:09 AM
Replies To: Pointers
#2
Re: Pointers
Posted 07 October 2009 - 10:31 PM
Anywhere you are referring to objects. The whole idea of pointers is to point to other objects or variables. Typically if you define a class (which can take up a lot of memory) you are going to use a pointer to it rather than moving that object around in memory itself which is inefficient and time consuming. So if you run into a program which has classes you are typically going to find pointers referring to those class instances.
For this reason data structures like linked lists pointing to nodes will have pointers, when you are passing arrays in and out of functions, or when you are trying to assign the value of one pointer to another to change what that pointer points to.
There are plenty of examples on the net which show you how to use and when to use pointers. Look at example programs that use objects to see pointers in action.
For this reason data structures like linked lists pointing to nodes will have pointers, when you are passing arrays in and out of functions, or when you are trying to assign the value of one pointer to another to change what that pointer points to.
There are plenty of examples on the net which show you how to use and when to use pointers. Look at example programs that use objects to see pointers in action.
#3
Re: Pointers
Posted 07 October 2009 - 10:31 PM
#4
Re: Pointers
Posted 08 October 2009 - 11:09 AM
Martyr2, on 7 Oct, 2009 - 09:31 PM, said:
Anywhere you are referring to objects. The whole idea of pointers is to point to other objects or variables. Typically if you define a class (which can take up a lot of memory) you are going to use a pointer to it rather than moving that object around in memory itself which is inefficient and time consuming. So if you run into a program which has classes you are typically going to find pointers referring to those class instances.
For this reason data structures like linked lists pointing to nodes will have pointers, when you are passing arrays in and out of functions, or when you are trying to assign the value of one pointer to another to change what that pointer points to.
There are plenty of examples on the net which show you how to use and when to use pointers. Look at example programs that use objects to see pointers in action.
For this reason data structures like linked lists pointing to nodes will have pointers, when you are passing arrays in and out of functions, or when you are trying to assign the value of one pointer to another to change what that pointer points to.
There are plenty of examples on the net which show you how to use and when to use pointers. Look at example programs that use objects to see pointers in action.
Thanks a lot
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote




|