CString operator += ― 2023-06-15 12:57
CString a = _T("a");
CString b = _T("b");
CString c = _T("c");
CString d = _T("d");
CString e = a + _T('\0') + b + _T('\0');
e.GetLength(); // 4
CString f = c + _T('\0') + d + _T('\0');
f.GetLength(); // 4
CString x, y;
x = e;
x = x + f;
x.GetLength(); // 8
y = e;
y += f;
y.GetLength(); // 5
なぜなのか
CString b = _T("b");
CString c = _T("c");
CString d = _T("d");
CString e = a + _T('\0') + b + _T('\0');
e.GetLength(); // 4
CString f = c + _T('\0') + d + _T('\0');
f.GetLength(); // 4
CString x, y;
x = e;
x = x + f;
x.GetLength(); // 8
y = e;
y += f;
y.GetLength(); // 5
なぜなのか
最近のコメント