본문 바로가기
공부하며놀자/프로그래밍

c++ CString to std::string, std::string to CString 문자열 변환

by 테너토너 2015. 11. 18.

ref : http://egloos.zum.com/merino/v/1090311

1. CString -> std::string

    CString str = "hello";

    std::string stdStr = str.GetBuffer(0);

 

2. std::string -> CString

    std::string stdStr = "hello";

    CString str  = stdStr.c_str();

반응형

댓글