I came across this code in win32 API programming tutorial and I am struggling to understand it.
if (msg == WM_NCCREATE)
{
const CREATESTRUCTW* const pCreate = reinterpret_cast<CREATESTRUCTW*>(lParam);
}
What does const CREATESTRUCTW* const pCreate
mean?
I did find this answer while doing my research. The example provided in that question was :
const GLvoid* const *indices
and a summary of the accepted answer is:
The correct way to write it is GLvoid const* const*
and the correct way to read it is from right to left which reads:
" It is a pointer to a const pointer to a const object of type GLvoid ".
This confused me even more because no matter how I read it, reading it from right to left reads:
" It is a const pointer(const*) to a const pointer(const*) to an object of type GLvoid(GLvoid)".
It would also be nice if anyone could explain it in terms of my question i.e. const CREATESTRUCTW* const pCreate
. Thanks.