Reason: An error occurred while compiling the program due to setting the character set Unicode property when creating an MFC project
Solution 1:
In the VS Solution Manager window, right-click your project “Project”, then select “Properties” (the last item), click “Configuration Properties”, a + sign, expand it, then select the “General” TAB, the penultimate “Character set”, and select “Use multi-byte Character Set”. Problem solving.
Solution 2:
Solution 1:
In the VS Solution Manager window, right-click your project “Project”, then select “Properties” (the last item), click “Configuration Properties”, a + sign, expand it, then select the “General” TAB, the penultimate “Character set”, and select “Use multi-byte Character Set”. Problem solving.
Solution 2:
Use the call CString::AllocSysString();
Such as:
CString str_cap(“haha”);
(const WCHAR *) (str_cap. AllocSysString ()); .
(LPCTSTR) (str_cap AllocSysString ()); Same as above link:
Click on the open link
Read More:
- Vs2013 error msb8031 solution today ran a MFC program, found that the error: error msb8031: building an MFC project for a non-U
- Write about the problems and solutions when configuring OpenGL in vs2015
- error C2137: empty character constant
- Solution: vs2017 cannot open header files such as stdio. H main. H
- How to solve the problem of string to CString garbled code?
- The usage and difference of atoi() and stoi() functions in C + +
- Opencv: the application can’t start normally
- Problems caused by vs project build order: link: fatal error lnk1181: cannot open input file ‘zoom’_ Ui_ style.lib ‘
- Solve the problem of VC6.0 open crash and OpenGL glut32.lib library
- Solution of unable to open source file “StdAfx. H” in vs2013 / 2012
- Vs output flashback
- Endnote x9 error
- After vs2019 is installed, the original vs2017 project cannot compile various error reports
- Failed to load Main-Class manifest attribute from when the jar file is running
- How to solve the error after Java importing project
- SQL Server 2008 18456 error and SA unable to login solution
- SQL Server 2005, unable to log in, forget sa password, 15405 error!
- fatal error LNK1169: one or more multiply defined symbols found