|
-
Aug 22nd, 2000, 06:02 AM
#10
The advantage is a pointers size. On a 32-bit environment an address is always 32-bit in size. That means that a pointer is always 4-byte large. Lets say that you want to pass a large string to a function. This string could actually be of any size and if you would pass this by value the program has to copy the whole string to the function argument.
But if you use a pointer you only pass 4 bytes (instead of maybe several kB).
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|