从对话框上获得到CString数据传值给另一个类的成员变量!为什么会出现这样的错误?

coldplay968 coldplay968 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
g_ServerConnect->GetUserInfo(m_Uid,m_UserName,m_PassWord);// 这里有问题


m_Uid,m_UserName,m_PassWord 这3个变量是和控件相关的

void CServerConnector::GetUserInfo(CString Uid, CString UserName, CString PW)
{
m_Uid = Uid;
m_UserName = UserName;
m_PassWord = PW;
}



单步调试的时候 程序会跳到这里来
const CString& CString::operator=(const CString& stringSrc)
{
if (m_pchData != stringSrc.m_pchData)
{
if ((GetData()->nRefs < 0 && GetData() != _afxDataNil) ||
stringSrc.GetData()->nRefs < 0)
{
// actual copy necessary since one of the strings is locked
AssignCopy(stringSrc.GetData()->nDataLength, stringSrc.m_pchData);
}
else
{
// can just copy references around
Release();
ASSERT(stringSrc.GetData() != _afxDataNil);
m_pchData = stringSrc.m_pchData;
InterlockedIncrement(&GetData()->nRefs);
}
}
return *this;
}
...全文
评论 2
收藏 已收藏
分享
返回顶部
coldplay968
VC/MFC 16,551 成员 421,605 内容