问题描述
static CStringData * __cdecl CloneData(_Inout_ CStringData * pData)
{
CStringData * pNewData = NULL;
// *********这个代码行是C String崩溃的点********* //
static CStringData* __cdecl CloneData(_Inout_ CStringData* pData)
{
CStringData* pNewData = NULL;
//*********This line of code is point where C String is Crashing*********//
IAtlStringMgr * pNewStringMgr = pData-> pStringMgr-> Clone();
IAtlStringMgr* pNewStringMgr = pData->pStringMgr->Clone();
// ****************** //
//******************//
这是代码压痕的行在任务操作期间。请为当前问题提供出路。
This is the line where code is creasing during the assignment operation. kindly provide the way out for the current problem.
harendra
推荐答案
也许您真的在寻找类似于
CStringData * pNewData = new CStringData;
现在pNewData指向由分配空间中的各种构造函数构建的实际对象。
Perhaps you were really looking for something like
CStringData *pNewData = new CStringData;
Now pNewData points to an actual object which was built by the various constructors in the allocated space.
这篇关于CString类在赋值操作期间崩溃。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!