const * volatile *

Discussion in 'C++' started by coolrama, Sep 10, 2005.

  1. coolrama

    coolrama Guest

    what does this declaration mean
    const * volatile *

    Is it valid. Is it used somewhere?

    Thanks
    Rama
    coolrama, Sep 10, 2005
    #1
    1. Advertising

  2. * coolrama:
    > what does this declaration mean
    > const * volatile *


    Read it from right to left.

    Look up the meaning of '*', 'volatile' and 'const', as you encounter them
    reading that way, in your C++ textbook.

    Which textbook is that, by the way?


    > Is it valid.


    Not on its own, it's not a full declaration of something.


    > Is it used somewhere?


    Presumably, where did you encounter it?

    --
    A: Because it messes up the order in which people normally read text.
    Q: Why is it such a bad thing?
    A: Top-posting.
    Q: What is the most annoying thing on usenet and in e-mail?
    Alf P. Steinbach, Sep 10, 2005
    #2
    1. Advertising

  3. coolrama

    red floyd Guest

    Alf P. Steinbach wrote:
    > * coolrama:
    >
    >>what does this declaration mean
    >>const * volatile *

    >
    >
    > Read it from right to left.
    >
    > Look up the meaning of '*', 'volatile' and 'const', as you encounter them
    > reading that way, in your C++ textbook.
    >
    > Which textbook is that, by the way?
    >
    >
    >
    >>Is it valid.

    >
    >
    > Not on its own, it's not a full declaration of something.
    >
    >
    >
    >>Is it used somewhere?

    >
    >
    > Presumably, where did you encounter it?
    >


    Once wrote (in C, but still valid C++):

    const volatile unsigned long *const MEM_MAPPED_REGISTER =
    (const volatile unsigned long *) 0xC0000000L;

    Of course, I was working directly at the hardware level....
    red floyd, Sep 10, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ron Natalie

    Re: volatile type copy constructor

    Ron Natalie, Jul 25, 2003, in forum: C++
    Replies:
    1
    Views:
    542
    Gwang Sik Yoon
    Aug 4, 2003
  2. Mantorok Redgormor

    volatile const int foo

    Mantorok Redgormor, Feb 16, 2004, in forum: C Programming
    Replies:
    1
    Views:
    3,662
    Martin Dickopp
    Feb 16, 2004
  3. ben
    Replies:
    5
    Views:
    593
    Ulrich Eckhardt
    Jan 11, 2005
  4. d.f.s.

    const volatile???

    d.f.s., May 17, 2006, in forum: C++
    Replies:
    9
    Views:
    562
    Phlip
    May 17, 2006
  5. Javier
    Replies:
    2
    Views:
    558
    James Kanze
    Sep 4, 2007
Loading...

Share This Page