佚名通过本文主要向大家介绍了python字符集问题,字符集问题,字符排列问题,字符编码问题,字符问题等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
问题: 字符相连问题
描述:
描述:
BSTR sTime;
在ActiveX控件中使用的是not using mfc,我想实现保存一个文件,文件名取当前时间,我怎样才能把年月日连在一起呀?CString用不了,我只好用BSTR了。
SYSTEMTIME st;
GetLocalTime(&st);
int nYear,nMonth,nDay,nHour;
nYear=st.wYear;
nM />
nDay=st.wDay;
nHour=st.wHour;
sTime=BSTR(nYear+nMonth);
sTime="c:\\"+sTime;
m_pDocObjFrame->SaveToFile(L"c:\\"+sTime+".doc",true);
MessageBox(NULL,LPCTSTR(sTime),"",MB_OK);
上面是我的代码,当进行到"sTime=BSTR(nYear+nMonth);"时就报
error C2110: cannot add two pointers,还有m_pDocObjFrame->SaveToFile这行也报同样的错误,由于本人是初学者,请大家帮帮忙!