S
Squignibbler
Hi all,
I have a question regarding the C++ programming language
regarding the nature of the relationship between pointers and arrays.
If the statement MyArray[x] is functionally identical to
*(MyArray+x), what statement is functionally identical to
MyArray[2,x]?
I ask this question because when I create a dynamic array with one
dynamic dimension e.g p_MyArray = new int [2,x] how do I access the
individual elements of the array using the pointer p_MyArray?
On a similar note, If I have created a dynamicly sized array of
structures, how do I retrieve the address of the member variable in any
given structure in the array?
I am aware that X = p_StructreArray->Member_variable will
retrive the value of MemberVariable through pointer p_StructureArray,
but how do I get the address?!
Thanks for any help or insight you can offer a beffuddled mind!
I have a question regarding the C++ programming language
regarding the nature of the relationship between pointers and arrays.
If the statement MyArray[x] is functionally identical to
*(MyArray+x), what statement is functionally identical to
MyArray[2,x]?
I ask this question because when I create a dynamic array with one
dynamic dimension e.g p_MyArray = new int [2,x] how do I access the
individual elements of the array using the pointer p_MyArray?
On a similar note, If I have created a dynamicly sized array of
structures, how do I retrieve the address of the member variable in any
given structure in the array?
I am aware that X = p_StructreArray->Member_variable will
retrive the value of MemberVariable through pointer p_StructureArray,
but how do I get the address?!
Thanks for any help or insight you can offer a beffuddled mind!