16,471
社区成员
发帖
与我相关
我的任务
分享
//单一证券的序列数据
struct CHqArray
{
CString stkcode;//证券代码;
CString windcode;//证券代码(万德代码)
CString period;//周期----‘D',日线,'W'周线,'M'月线,'Y'年线,'t'tick数据,'1'一分钟,'30'....
CArray<CHqData,CHqData&> hqDataArray;//行情序列
virtual void operator = (const CHqArray &other)
{
if(this != &other)
{
stkcode = other.stkcode;
windcode = other.windcode;
period = other.period;
hqDataArray.Copy(other.hqDataArray);
}
}
};
//单一证券的序列数据
struct CHqArray
{
CString stkcode;//证券代码;
CString windcode;//证券代码(万德代码)
CString period;//周期----‘D',日线,'W'周线,'M'月线,'Y'年线,'t'tick数据,'1'一分钟,'30'....
CArray<CHqData, CHqData&> hqDataArray;//行情序列
CHqArray() {}
CHqArray(const CHqArray& o)
{
if (&o != this)
{
stkcode = o.stkcode;
windcode = o.windcode;
period = o.period;
}
}
CHqArray operator =(const CHqArray& o)
{
if (&o != this)
{
stkcode = o.stkcode;
windcode = o.windcode;
period = o.period;
}
return *this;
}
};
注意:
1)请根据业务需要自行完成拷贝构造函数和重载赋值运算符
2)原理请自行度娘
3)有问题请给我留言//单一证券的序列数据
struct CHqArray
{
CString stkcode;//证券代码;
CString windcode;//证券代码(万德代码)
CString period;//周期----‘D',日线,'W'周线,'M'月线,'Y'年线,'t'tick数据,'1'一分钟,'30'....
CArray<CHqData, CHqData&> hqDataArray;//行情序列
CHqArray() {}
virtual CHqArray& operator =(const CHqArray& o)
{
if (&o != this)
{
stkcode = o.stkcode;
windcode = o.windcode;
period = o.period;
}
return *this;
}
};