Question 11.10The reason that you cannot assign a char ** value to a const char ** pointer is somewhat obscure.
The reason is somewhat obscure ??
Question 11.10The reason that you cannot assign a char ** value to a const char ** pointer is somewhat obscure.
The reason is somewhat obscure ??
Did you read the rest of the answer?
It's "somewhat obscure" because it's not immediately clear why you cannot do that, so it requires a bit of explanation. That explanation is contained on that page that you linked to.
If you don't know, don't comment.
I suppose, safety..
Last edited by Salem; 11-26-2022 at 02:45 AM. Reason: Snipped garbage URL
Since you seem to just be trolling people, can you explain why this code doesn't work?
Hope you don't find too much that is abhorrent in thereCode:int my_strlen(char *s) { char *a = s; while(1) { s++; if(s[-1] == '\0') break; } // A non-MIRSA 2004 compliant comment, just for fun. return s-a-1; }
@hamster_nz
I assure you, work is being done.
So you are wrong..
So yes these post are relevant.
They may not be relevant to you, because you can't see my documents.
That's all.
Who says I don't know? I explained exactly why it says the reason is "somewhat obscure"!
Basically. It's so that a function can't inadvertently bypass the const-ness of a pointed-to object (a function would have to use an explicit cast to remove the const-ness).
I think it's way past the time that you should read How To Ask Questions The Smart Way if you want to get anything useful out of this or any other forum and not be rightfully labelled a troll or Help Vampire.
@christop
If you have nothing to add, refrain from commenting.
C Traps and PitfallsHope you don't find too much that is abhorrent in there
Amazon.com
Why do you persists in these sub-standard ways..Hope you don't find too much that is abhorrent in there
Similarly, one may mistake a cursive handwriting with sharpness and mastery,
Even if it seems conventional and accepted, this a serious contradiction,
By removing style from a handwriting, the handwriting becomes readable and excellent.
This is what you fail to realize.