MFC read-Write files

Source: Internet
Author: User

Many of the related function parameters of a file operation are pointer types that point to constants.


Pointer to constant: (indicates that the object being pointed to is a constant) the pointer points to the address of a constant, which cannot modify the constant value through the address.


Pointer constants: (The pointer itself [address] is a constant) pointer value is not modifiable, the point of the content can be modified.

Char ch[5]= "list";

char* const PSTR = ch;


The C language file operation uses the file structure body.

Used in C + +: Ofstream ().


Win32 API platform for file operation support: File Operation CreateFile, you can create or open file, disk, pipe data.



Support for file operations in MFC: CFile is the MFC base class and does not support buffering.




Win32-based applications, you should store program information in the registry. You can use Cwinapp::writeprofilereg to add key values in the registry.


MFC read-Write files

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.