vc++一简单问题!

来源:百度知道 编辑:UC知道 时间:2024/05/26 22:19:05
if (KEY_DOWN(VK_DOWN))
{
if((timeGetTime()-m_Time2)<=32)
{
player2str=player2str+"down";
m_Time2=timeGetTime();
}
else
{
player2str="";
player2str="down";
m_Time2=timeGetTime();
}
}
(timeGetTime()-m_Time2)大于32的时候就报错,帮我看看为什么

你这个程序应该是用C/C++ Builder或MFC做的播放器吧。
m_time2是起始播放时间?
如果是这样的话,timegettime-m_time2根本就不可能大于32啊。。。

你已经判断(timeGetTime()-m_Time2)小于等于32了还报什么错?
麻烦你把错误贴出来好不好,代码也不完整,我也是菜鸟,猜测错误是很困难的。

if( KEY_DOWN(VK_DOWN) )///还有这样写法,遇见高人了

player2str="";
player2str="down";

player2str 什么类型?