CString is not part of the C++ standard library. In a plain Win32 console project the compiler only sees standard headers, so #include (the C header for memcpy, strcmp, etc.) will not declare CString. You have two clean options: Prefer standard C++: use std::string (or std::wstring for Unicode).