显示的数字正好是应该输出的4呗
char vol[100];
sprintf(vol, "%d", v);
CString volume(vol);
MessageBox(NULL, volume, L"数量", MB_OK);
sprintf(vol, "%d", v);
v在哪里定义的
使用CString::Format方法
CString volume;
volume.Format(_T("%d"),v);
MessageBox(NULL, volume, L"数量", MB_OK);