Function argument that is a pointer to memory which the function is not allowed to modify, as in C const

Cecil Ward d at cecilward.com
Thu Mar 15 22:21:05 UTC 2018


On Wednesday, 14 March 2018 at 22:23:47 UTC, Cecil Ward wrote:
> say in C I have a function with a pointer argument
>     foo( const sometype_t * p )
>
> [...]


That's the secret - I didn't know about the const (T) * thing - I 
would never have discovered that ! Many thanks, the missing piece 
to the puzzle.

Many generous replies, thanks to all for their extremely helpful 
contributions. There is a wealth of precious explanation in them, 
and apologies for not thanking the contributors individually.


More information about the Digitalmars-d-learn mailing list