hi
please I want sm to tell me about the signification of the following expression:
std::complex<float> (*W)[M] = &Z[k][0];
knowing the following declarations:
Z[N][P][M];
et 0 <= k < N
thanks for answer
hi
please I want sm to tell me about the signification of the following expression:
std::complex<float> (*W)[M] = &Z[k][0];
knowing the following declarations:
Z[N][P][M];
et 0 <= k < N
thanks for answer
[B]std::complex<float> Z[N][P][M] ;[/B]
[B]Z[/B] is an array of [B]N[/B] elements,
each element of which is an array of [B]P[/B] elements,
each element of which is an array of [B]M[/B] elements,
each element of which is a [B]std::complex<float>[/B]
std::complex<float> (*W)[M] = &Z[k][0] ;
W is a pointer to an array of M elements, each of which is a std::complex<float>
&Z[k][0] is the address of an array of M elements, each element being a std::complex<float>. this address is used to initialize W.
that is the meaning of the statement (incidentally, int i = 100 ;
is *not* an expression.)
what its significance is, or why someone would want to do this, i have no idea.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.