关于cstring赋值的问题 出现内存错误
c++吧
全部回复
仅看楼主
level 5
woshuia000 楼主
有一个类A
class AFX_EXT_CLASS A : public CObject
{
protected:
DECLARE_DYNAMIC(A)
public:
A();
~A();
public:
int m_iPrgID;
CWnd* pParentWnd;
int m_Scalez,scale;
double RadiusSmooth,LengthSmooth,RotateAngle;
//路径和文件名
CString datafilepath;
CString dfname;
int MetricUnit; //度量单位:0-米制,1-英制,2-经纬度
}
调用
A a;
a.pParentWnd = NULL;
a.MetricUnit=0;
//下面语句出现内存错误 m_strRootPath是CString类型的路径
a.datafilepath = m_strRootPath;
2013年07月26日 12点07分 1
level 5
woshuia000 楼主
上面给类中文件路径字符串赋值时出现内存错误 有没有大神可以分析下
2013年07月26日 12点07分 2
level 5
woshuia000 楼主
2013年07月26日 12点07分 3
level 5
woshuia000 楼主
求助啊
2013年07月26日 13点07分 4
level 5
woshuia000 楼主
[乖]
2013年07月27日 02点07分 5
我也出错了,不知lz解决了没
2013年07月31日 04点07分
回复 cian1230 :多重生成几次 莫名其妙的好了 很纳闷
2013年07月31日 14点07分
1