Home > Software engineering >  Cstrings variable bindings edit box, why cstrings GetBuffer () fewer characters
Cstrings variable bindings edit box, why cstrings GetBuffer () fewer characters

Time:03-03

 
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:

reference 1/f, happy fat electrician reply:
that the size of the result should be a char pointer variable (getbuffer return values), the size of the return value is a fixed value,

,, so that's it
  • Related