|
-
Jun 7th, 2002, 02:13 AM
#1
Thread Starter
New Member
Vectors & Pointers !!!
Can anybody tell me the difference between a vector & a pointer ???
-
Jun 7th, 2002, 06:06 AM
#2
A vector has direction and size (magnitude). Acceleration is a vector for example. People also refer to a one-dimensional array as a vector.
A pointer is a simple variable that holds an integer. In the variable is an address in computer memory. That address is the location of another variable. Passing a variable to a subroutine by reference (the address of the variable is placed on the stack) is an example of using a pointer. Pointer are more interesting than just this base definition. You cannot program in C or C++ without them.
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
|