can anyone explain the difference between the data type of PSZ and
PCSZ, from my understanding PSZ is a pointer to an array of char, and is
a pointer to a const PCSZ (without having to specify const), but is
there any more to this?
Regards
Adrian Suri
Lars
> PCSZ is a constant pointer to a zero terminated string while PSZ is a
> pointer to a zero terminated string.
I thought it was a pointer to a constant zero terminated string, which is
not the same thing i.e. you can change the pointer, but not the contents
of what it is pointing to.
Thanks for that, thought that might be the case but was not 100% certain
Regards
Adrian
PCSZ p;
p = (PCSZ)malloc(100);
*p = 'A'; /* is forbidden */
p[5] = 'A'; /* is forbidden */
*(p+10) = 'A' /* is forbidden */
Lars