기본 콘텐츠로 건너뛰기

4월, 2021의 게시물 표시

unicode 와 ansi, std::string 과 CString 상호 변경하기

  CString  cstring ( _T ( "CString::CStringT" ));   std :: string  str ( "std::string" );   std :: wstring wstr ( _T ( "std::wstring" ));   // std::string <-- CString str   =  std :: string ( CT2CA ( cstring . operator   LPCWSTR ()));   // std::wstring <-- CString wstr  =  std :: wstring ( cstring . operator   LPCWSTR ());   // CString <-- std::string cstring  =   CString :: CStringT ( CA2CT ( str . c_str ()));   // CString <-- std::wstring cstring  =   CString :: CStringT ( wstr . c_str ());   // std::string <-- std::wstring str   =  std :: string ( CT2CA ( wstr . c_str ()));   // std::wstring <-- std::string wstr  =  std :: wstring ( CA2CT ( str . c_str ()));  

리눅스 버전 확인

 [root@webserver ws]# cat /proc/version Linux version 3.10.0-957.5.1.el7.x86_64 (mockbuild@kbuilder.bsys.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC) ) #1 SMP Fri Feb 1 14:54:57 UTC 2019 [root@webserver ws]# uname -a Linux webserver 3.10.0-957.5.1.el7.x86_64 #1 SMP Fri Feb 1 14:54:57 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux [root@webserver ws]# cat /etc/*release CentOS Linux release 7.6.1810 (Core) NAME="CentOS Linux" VERSION="7 (Core)" ID="centos" ID_LIKE="rhel fedora" VERSION_ID="7" PRETTY_NAME="CentOS Linux 7 (Core)" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:centos:centos:7" HOME_URL="https://www.centos.org/" BUG_REPORT_URL="https://bugs.centos.org/" CENTOS_MANTISBT_PROJECT="CentOS-7" CENTOS_MANTISBT_PROJECT_VERSION="7" REDHAT_SUPPORT_PRODUCT="centos" REDHAT_SUPPORT_PRODUCT_VERSION="7" CentOS Linux release 7.6.1810 (Core) CentOS Linu