求高手帮忙,C语言结构体数据运算
现有一结构体:typedefstruct{shortm_date;shortm_time;floatOpen;//floatHight;floatLow;floatClo...
现有一结构体:typedef struct
{
short m_date;
short m_time;
float Open; //
float Hight;
float Low;
float Close;
float Amount;
int Vol;
int reservation;
}T1,T2;
另外 short f = 0;
short t1 = 0;
short t2 = 0;
T1.m_date,T1.m_date都是2867,
t1 = &T1.m_date;
t2 = &T2.m_date;
f = t2 - t1;
f不为0;
而
t1 = T1.m_date;
t2 = T2.m_date;
f = t2 - t1;
f也不为0;
请问这是为什么,怎样使f也为0? 展开
{
short m_date;
short m_time;
float Open; //
float Hight;
float Low;
float Close;
float Amount;
int Vol;
int reservation;
}T1,T2;
另外 short f = 0;
short t1 = 0;
short t2 = 0;
T1.m_date,T1.m_date都是2867,
t1 = &T1.m_date;
t2 = &T2.m_date;
f = t2 - t1;
f不为0;
而
t1 = T1.m_date;
t2 = T2.m_date;
f = t2 - t1;
f也不为0;
请问这是为什么,怎样使f也为0? 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询