none
Combine with Write for read/write access? RRS feed

  • Question

  • By MSDN,
            FileAccess  - Defines constants for read, write, or read/write access to a file.
                Read - Read access to the file. Data can be read from the file. Combine with Write for read/write access.
                ReadWrite - Read and write access to the file. Data can be written to and read from the file.
                Write - Write access to the file. Data can be written to the file. Combine with Read for read/write access.

    I don't understand the meaning of Combine with Writefor read/write access in the member "Read". What does it mean? Code would be great.

    Monday, February 23, 2015 6:01 PM

Answers

  • Those are flag attributes. You can combine them (or) to have multiple flag bits set at once.

    E.g. Read| Write=ReadWrite.

    Bit operations are common in Win32 programming. E.g. a group box would be created with BS_GROUPBOX | WS_CHILD | WS_VISIBLE styles.



    Visual C++ MVP


    • Edited by Sheng Jiang 蒋晟 Monday, February 23, 2015 6:38 PM
    • Marked as answer by HZ.USA Monday, February 23, 2015 6:43 PM
    Monday, February 23, 2015 6:32 PM