home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / c / 16669 < prev    next >
Encoding:
Text File  |  1992-11-17  |  1.6 KB  |  43 lines

  1. Newsgroups: comp.lang.c
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!saimiri.primate.wisc.edu!ames!agate!doc.ic.ac.uk!mrccrc!warwick!coventry!champion
  3. From: champion@cch.coventry.ac.uk (Alun)
  4. Subject: Re: const char *p == char const *p ?
  5. Message-ID: <BxuxHw.Ant@cck.coventry.ac.uk>
  6. Sender: news@cck.coventry.ac.uk (news user)
  7. Nntp-Posting-Host: cc_sysh
  8. Organization: Coventry University, Coventry, UK.
  9. References: <1992Nov15.162912.17454@news.uiowa.edu> <1992Nov16.010820.26757@cs.tu-berlin.de> <3870@dozo.and.nl>
  10. Date: Tue, 17 Nov 1992 11:05:54 GMT
  11. Lines: 30
  12.  
  13. In article <3870@dozo.and.nl> jos@and.nl (Jos Horsmeier) writes:
  14. ~In article <1992Nov16.010820.26757@cs.tu-berlin.de> jutta@opal.cs.tu-berlin.de (Jutta Degener) writes:
  15. ~|bonak@herky.cs.uiowa.edu (Esmail Bonakdarian) writes:
  16. ~|> Is "char const *p" equivalent to "const char *p"?
  17. ~|
  18. ~|Yes.  They are both pointers to constant character; you may
  19. ~|change the pointer, but not the character it points to.
  20. [stuff deleted]
  21. ~
  22. ~Sorry, you're making a mistake, `const char * p' is _not_ equivalent
  23. ~to `char * const p'. The first declaration reads: `there is a character
  24. ~constant, and p points to it', while the second one reads: `this is 
  25. ~a character pointer p and it is a constant.' 
  26. ~
  27. ~Jos aka jos@and.nl
  28.  
  29. RTFQ.
  30.  
  31. The question was
  32. Is "char const *p" equivalent to "const char *p"?
  33.  
  34. Regards
  35.  
  36.     -Alun
  37.     
  38. -- 
  39. A.Champion                |  That's an interesting point, in the sense of
  40. (champion@uk.ac.cov.cck)  |    being very not interesting at all. - The Liar
  41.   *I'm as bad as the worst - but thank God(?) I am as good as the best !!*
  42.                 *I'm not modest - I'm just honest*
  43.