Article View: comp.std.c
Article #23Re: Questions about conversions of pointer-to-qualified types.
From: Stanley Friesen
Date: Thu, 29 Oct 1992 01:31
Date: Thu, 29 Oct 1992 01:31
29 lines
1491 bytes
1491 bytes
In article <1ck68gINNeba@news.aero.org> lmiller@aero.org (Lawrence H. Miller) writes: |In article <1323@tdat.teradata.COM> swf@tdat.teradata.com (Stanley Friesen) writes: |> |>No, it is not legal. This is identical in `meaning' to: |> void *vp; |> const char *ccp; |> vp = ccp; |>[The order of "const" and "char" does not matter]. | | Nope. | | const char *ccp; | means that ccp is a pointer (not a const pointer) | to a constant char. After this declaration, an | assignment to p is valid; an assignment to *p is not. | | char * const ccp; | means that ccp is a constant pointer to a char. I said the order of const and char does nto matter, *not* the order of "const", "char" and "*" does not matter. The two examples in the original differ *only* in the order of the const and char. *Both* put the "*" after the key words. Your example is a different animal altogether. -- sarima@teradata.com (formerly tdatirv!sarima) or Stanley.Friesen@ElSegundoCA.ncr.com
Technical Details
Message-ID:
<1333@tdat.teradata.COM>Path:
arc1-ca.pugleaf.net!sparky!uunet!tdat!swfReferences:
<1992Oct27.073329.6679@netcom.com> <1323@tdat.teradata.COM> <1ck68gINNeba@news.aero.org>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!tdat!swf From: swf@teradata.com (Stanley Friesen) Newsgroups: comp.std.c Subject: Re: Questions about conversions of pointer-to-qualified types. Message-ID: <1333@tdat.teradata.COM> Date: 29 Oct 92 01:31:00 GMT References: <1992Oct27.073329.6679@netcom.com> <1323@tdat.teradata.COM> <1ck68gINNeba@news.aero.org> Sender: news@tdat.teradata.COM Reply-To: swf@tdat.teradata.com (Stanley Friesen) Organization: NCR Teradata Database Business Unit Lines: 29