CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: C++ Faq

  1. #1
    Join Date
    Jan 2006
    Posts
    28

    C++ Faq

    Hi all,

    I was reading a very old book called C++ FAQ. In reading about the constness of an object. I come across this question

    "Does const apply to the object's bitwise state or its abstract state?"

    In this question, what is bitwise state and abstract state or observable state.

    Thanks in advance.

  2. #2
    Lindley is offline Elite Member Power Poster
    Join Date
    Oct 2007
    Location
    Seattle, WA
    Posts
    10,895

    Re: C++ Faq

    It means that two objects could be logically identical but not have precisely the same bit pattern in memory. Essentially, it means that you need operator== because memcmp() isn't good enough.

  3. #3
    Join Date
    Jan 2006
    Location
    Singapore
    Posts
    6,765

    Re: C++ Faq

    Perhaps this answer to the FAQ What is a "const member function"? would help you understand. In particular, take note of the last paragraph.
    C + C++ Compiler: MinGW port of GCC
    Build + Version Control System: SCons + Bazaar

    Look up a C/C++ Reference and learn How To Ask Questions The Smart Way
    Kindly rate my posts if you found them useful

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured