S
S
sddvxd2018-12-12 00:46:39
C++ / C#
sddvxd, 2018-12-12 00:46:39

How to describe a pointer to a two-dimensional array?

Good evening
Of course I understand, the question may be a bit stupid, but I can't use ii in my program in any way. How can this object be used to iterate over all the elements of a two-dimensional array?

int i[2][2] = {{1, 2}, {3, 4}};
    int **ii = (int**)i;

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
jcmvbkbc, 2018-12-12
@sddvxd

int i[2][2] = {{1, 2}, {3, 4}};
int (*ii)[2] = i;
ii[0][0];

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question