这三个字符转变量加起来怎么不对啊?
hbboy 2004-05-14 01:40:29 请问下面的语句有错吗?
为什么AfxMessageBox(str1+str2+str3);这句显示是空的呢?
CString str1,str2,str3;
globle_strDataSource="DSN=webwolf_chinakorea;UID=sa;PWD=gyj;";
CString stempini;
::GetPrivateProfileString("ID_SYSTEM_CONFIG","DSN","webwolf_chinakorea",stempini.GetBuffer(MAX_PATH),MAX_PATH,".\\config.ini");
str1 = stempini;
AfxMessageBox(str1);
::GetPrivateProfileString("ID_SYSTEM_CONFIG","UID","sa",stempini.GetBuffer(MAX_PATH),MAX_PATH,".\\config.ini");
str2 = stempini;
AfxMessageBox(str2);
::GetPrivateProfileString("ID_SYSTEM_CONFIG","PWD","gyj",stempini.GetBuffer(MAX_PATH),MAX_PATH,".\\config.ini");
str3 = stempini;
AfxMessageBox(str1+str2+str3);