[zeromq-dev] possible bug in zframe.c ?
asif saeed
asif.lse2 at gmail.com
Thu Jun 20 07:28:08 CEST 2013
@Bjorn
1st two are correct and mean the same thing except that the 1st one may
create some issues when used with typedefs.
The 3rd one is wrong - it should be " const char *const x ==> x is a
constant pointer to constant character".
Best regards,
-Asif
PS: The comment is based on my understanding of C++. AFAIK, C treats consts
the same as C++.
On Tue, Jun 18, 2013 at 6:48 PM, Bjorn Reese <breese at mail1.stofanet.dk>wrote:
> On 06/18/2013 03:34 PM, Pieter Hintjens wrote:
>
> > "const char *x" => "x is a pointer to characters which are constant"
> > "char const *x" => "x is a pointer that is constant, to characters
> > (which may be changed)"
> > "const char const *x" => "x is a pointer to constant characters and is
> > itself constant"
>
> Only the first is correct. See:
>
> http://c-faq.com/ansi/constptrconst.html
> http://www.parashift.com/c%2B%2B-faq-lite/const-ptr-vs-ptr-const.html
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20130620/44139b23/attachment.htm>
More information about the zeromq-dev
mailing list