const comparison in C and C++

T. William Wells bill at proxftl.UUCP
Sun Sep 18 16:30:11 AEST 1988


In article <1411 at solo3.cs.vu.nl> maart at cs.vu.nl (Maarten Litmaath) writes:
: In article <8500 at smoke.ARPA> gwyn at brl.arpa (Doug Gwyn (VLD/VMB) <gwyn>) writes:
: \Essentially, C++ "const" means "constant"; ANSI C "const" means "readonly".
:
: Aha! That means the following is correct?
:
: const volatile int * const clock;     /* clock is a readonly pointer to */
:                                       /* a readonly and volatile int    */

Almost.  As specified, it is not initialized and so contains a
null pointer.  You should initialize it to the right address.

---
Bill
novavax!proxftl!bill



More information about the Comp.lang.c mailing list