F
Foobarius Frobinium
Bill Potter said:I am a learning programmer in C and i want to know why some one would use
pointers instead of going direct!
Well, plenty of reasons. Since, obviously, you don't want to make all
data global, you can use them to reference data defined in other
functions. Dynamic allocation in C is done with pointers, as well as
command line arguments (int argc, char **argv). Plus, by referencing
data instead of copying it, you don't waste space.