CString→char 変換
CString型からcharへの変換は、strcpy_s関数と、CT2Aマクロを使うと便利なようです。
CString hoge( "hogehoge" ); int sizeBuf = hoge.GetLength() + 1; char* buf = new char [ sizeBuf ]; strcpy_s( buf, sizeBuf, CT2A(hoge) );
CString型からcharへの変換は、strcpy_s関数と、CT2Aマクロを使うと便利なようです。
CString hoge( "hogehoge" ); int sizeBuf = hoge.GetLength() + 1; char* buf = new char [ sizeBuf ]; strcpy_s( buf, sizeBuf, CT2A(hoge) );