home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!saimiri.primate.wisc.edu!ames!agate!doc.ic.ac.uk!mrccrc!warwick!coventry!champion
- From: champion@cch.coventry.ac.uk (Alun)
- Subject: Re: const char *p == char const *p ?
- Message-ID: <BxuxHw.Ant@cck.coventry.ac.uk>
- Sender: news@cck.coventry.ac.uk (news user)
- Nntp-Posting-Host: cc_sysh
- Organization: Coventry University, Coventry, UK.
- References: <1992Nov15.162912.17454@news.uiowa.edu> <1992Nov16.010820.26757@cs.tu-berlin.de> <3870@dozo.and.nl>
- Date: Tue, 17 Nov 1992 11:05:54 GMT
- Lines: 30
-
- In article <3870@dozo.and.nl> jos@and.nl (Jos Horsmeier) writes:
- ~In article <1992Nov16.010820.26757@cs.tu-berlin.de> jutta@opal.cs.tu-berlin.de (Jutta Degener) writes:
- ~|bonak@herky.cs.uiowa.edu (Esmail Bonakdarian) writes:
- ~|> Is "char const *p" equivalent to "const char *p"?
- ~|
- ~|Yes. They are both pointers to constant character; you may
- ~|change the pointer, but not the character it points to.
- [stuff deleted]
- ~
- ~Sorry, you're making a mistake, `const char * p' is _not_ equivalent
- ~to `char * const p'. The first declaration reads: `there is a character
- ~constant, and p points to it', while the second one reads: `this is
- ~a character pointer p and it is a constant.'
- ~
- ~Jos aka jos@and.nl
-
- RTFQ.
-
- The question was
- Is "char const *p" equivalent to "const char *p"?
-
- Regards
-
- -Alun
-
- --
- A.Champion | That's an interesting point, in the sense of
- (champion@uk.ac.cov.cck) | being very not interesting at all. - The Liar
- *I'm as bad as the worst - but thank God(?) I am as good as the best !!*
- *I'm not modest - I'm just honest*
-