Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • 1
    I have never seen that before and I agree that it is a very useful trick. Commented Oct 20, 2008 at 21:30
  • 2
    It's not a trick :). I try to use const where possible with function arguments so that it is clear that the function won't modify the string or structure being passed in. Commented Oct 20, 2008 at 21:35
  • The confusing thing is that const often appears twice in a declaration, and it may actually be in a few different positions. Commonly it might appear as something like const uint8 *const value. This declares that the pointer and the value it points to are not modifiable (but can be if casted). Commented Jun 7, 2014 at 8:52