|
|
|
 |
Posted 2006-02-07, 06:52 AM
in reply to sciencekid's post starting "ok, what about this peice of code, what..."
|
 |
 |
 |
pS is a pointer that, as its value, has the address of s.
In that context, it's pretty useless. What you're going to be using it for in the beginning is passing it to functions. Since, if you pass a variable, you can only change it in the main function if you actually return it, pointers will become useful when you want to change more than one variable in a function.
If you pass the pointer, you can change the value of the pointer (which you'd never really want to do in this situation), and, more importantly, you can change the value of the variable that the pointer points to.
Really, just work these basic examples, and it'll become evident soon enough.
D3V said:
This message is hidden because D3V is on your ignore list.
|
What is it they say about silence being golden?
|
 |
 |
 |
|
|
|
|
|
|
|