#include <atlstr.h> void ExampleUse() { CString a = "aaa"; CString b = "bbb"; CString c = a + b; // For example }But normally in a non-MFC project I would use use std::string with #include <string> By the way, ATL stands for Active Template Libray - the orginal name of MFC https://en.wikipedia.org/wiki/Active_Template_Library
Programming Tips - MSVC: Use CString class in non-MFC project
Date: 2021may18
Update: 2025aug21
Product: MSVC++
Framework: ATL
Q. MSVC: Use CString class in non-MFC project
A. If you are using MSVC (without MFC), pull in atlstr.h and you can use it, like this: