How to use CString in non-MFC applications?
(Top) In most cases, you don’t need to do that. In order to use CString you have to statically or dynamically link your application to the entire MFC. This would not only increase the size of your executable file, the number of its dependencies, but also makes your program non-portable (especially if it is a Console application). The recommended solution is to use the Standard C++ Class std::string. It is as powerfull as CString, is portable, using it does not imply adding a huge amount of things you don’t need to your project and last, but not least, it is part of the programming language. This being said, if you still want to use CString in your non-MFC application, here it is whar you have to do: – Include