what the hell does this mean...

Started by
1 comment, last by Mister Stewart 23 years, 5 months ago
suppose you have something in your C++ code that looks like this: **list; this is supposed to be a list of pointers, but it''s not an array(i don''t think it is anyway), so can any one rell me how this works? Thanks in advance. Also, on a completely unrelated topic, which do you think is better for making low poly models for use in games - milkshape or blender? just curious I AM TONY MONTANA!!! YA F**K WITH ME, YA F**K WITH DA BEST!!!
"16 days?? that's almost two weeks!!" Tucker
Advertisement
It''s a pointer to a pointer...

and array is simply a pointer to some memory space, if you have
char temp[100]; temp is a pointer to char.

What you have is a pointer to and array, it''s just that you don''t have any memory space for the array yet.

But you could just type: TYPE *list[100]; and you''ll have an array of pointers to TYPE
Depends on what you do, but you can access it like an array if wanted to.

For an instance, if you wanted to access the pointer that was in the 4 position it is valid to do this with an index like an array :

*list[4]

You could also do list[4][3] if say the 4th element was a string. Just imagine if using the argv variable on command line. Most code you will see would do something like string=argv[2]. Well argv[][] actually **argv.

This note does not seem to clear to me. Think it would be better to include in your post what or how you are using your pointer to pointer. Then maybe a better example could be given.


-----------------------------------------------
All messages are of my own personal opinion and
not meant to offend. But if they do - tough

Neuro.
-----------------------------------------------All messages are of my own personal opinion and not meant to offend. But if they do - tough :)Neuro.

This topic is closed to new replies.

Advertisement