Re: how to definition a non-const pointer that point a const var.

2019-08-24 Thread Jonathan M Davis via Digitalmars-d-learn
On Saturday, August 24, 2019 12:48:33 AM MDT Max Haughton via Digitalmars-d- learn wrote: > On Saturday, 24 August 2019 at 05:03:43 UTC, Jonathan M Davis > > wrote: > > On Friday, August 23, 2019 10:14:56 PM MDT lili via > > > > Digitalmars-d-learn wrote: > >> Hi: > >>In C we can definition con

Re: how to definition a non-const pointer that point a const var.

2019-08-23 Thread Max Haughton via Digitalmars-d-learn
On Saturday, 24 August 2019 at 05:03:43 UTC, Jonathan M Davis wrote: On Friday, August 23, 2019 10:14:56 PM MDT lili via Digitalmars-d-learn wrote: Hi: In C we can definition const int *ncp_to_cv; or int * const cp_to_ncv; How to do this in D. D uses parens to restrict how much of th

Re: how to definition a non-const pointer that point a const var.

2019-08-23 Thread Jonathan M Davis via Digitalmars-d-learn
On Friday, August 23, 2019 10:14:56 PM MDT lili via Digitalmars-d-learn wrote: > Hi: >In C we can definition const int *ncp_to_cv; > or int * const cp_to_ncv; >How to do this in D. D uses parens to restrict how much of the type is const. const int* - const pointer to const int const(