Some questions about using CString in C + +

Source: Internet
Author: User

CString used in Unicode state are wide character sets, when it is necessary to write to the ANS standard txt text format, often appear to write the state of the hexadecimal address, because they are using MFC under the CString, and the output stream is selected by the FStream specific code as follows:

1     ofstream outtxt;        2     std::string dname;                          // display correctly but with extra spaces             3     Dname = CStringA (back[0]);  //  4     outtxt << dname.c_str ();   

Try to use a lot of getbuffer are not, forced conversion is not possible, the last method is feasible, but it is more out of some space, this is more than normal display much better!

Finally Unicode is a little complicated!

Some questions about using CString in C + +

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.