Void CDialog_Tab4: : OnBnClickedBtnRoomCreate ()
{
UpdateData(TRUE);
Char szRoomName [16]={0};
Memcpy (szRoomName, m_csRoomName GetBuffer (), sizeof (m_csRoomName. GetBuffer ()));
MyDbgPrintf (" szRoomName: % s ", szRoomName);
M_csRoomName. ReleaseBuffer ();
}
CodePudding user response:
The size of the result should be a char pointer variable (getbuffer return values), the size of the return value is a fixed value,CodePudding user response: