
timeGetTime problem
I have:
//global
long oldtime,newtime;
//
//function
newtime=timeGetTime;
if(newtime-oldtime>2000)
idle++;
//
//bottom
if(!KEYDOWN(VK_UP) && !KEYDOWN(VK_DOWN) && !KEYDOWN(VK_LEFT) && !KEYDOWN(VK_RIGHT) && !KEYDOWN(VK_SPACE)){
oldtime=timeGetTime();
}
//
And I get this error:
error C2440: ''='' : cannot convert from ''unsigned long (__stdcall *)(void)'' to ''long''
This conversion requires a reinterpret_cast, a C-style cast or function-style cast
Any ideas?
Thanks!

timeGetTime is a function ()
------------------General Equation, this is Private Function reporting for duty, sir!a2k
Hello, Mike00. i think everyone has noticed that you have posted quite a bit of problems in this forum. we certainly don''t mind answering them, but i have noticed a few things that could have been looked up upon prior to asking the gamedev community.
now, i don''t want to, by no means, stop you from asking any of your questions, because we''re all glad to try and help, but perhaps sometimes some of your questions can be answered by spending a little bit more time with your compiler, language, and opengl sources. for instance, i know the answer to this gettime function through experience, (the error) i mean, but i remember the first time i actually had an error like that, i looked it up with ALL the resources that i was presented with. for instance, if you''re using MS VC++, i would have gone into MSDN and searched the timeGetTime as a keyword, and it would bring up plenty of information that can possibly solve my problem.
the thing about programming is, that it''s totally experimental. i am not the best programmer. the way i solve my problems is try several things several times. i hit my compile button like crazy. like, if i don''t notice anything on the screen, i change one thing that could possibly be the cause of the error, and then i compile, check it out, if not, then try another thing on your "list of possible reasons why the thing ain''t showing up the screen." try to be experimental with your code. have fun. explore. everyone is a newbie at one time (hopefully when they first enter the forums) and we understand this. i would just hope that you do PLENTY of digging around prior to us giving the solution to your problem.
happy coding, and keep asking those questions. we''ll answer ''em if we can. just do a little bit more digging. it''s part of what a programmer is.
a2k
now, i don''t want to, by no means, stop you from asking any of your questions, because we''re all glad to try and help, but perhaps sometimes some of your questions can be answered by spending a little bit more time with your compiler, language, and opengl sources. for instance, i know the answer to this gettime function through experience, (the error) i mean, but i remember the first time i actually had an error like that, i looked it up with ALL the resources that i was presented with. for instance, if you''re using MS VC++, i would have gone into MSDN and searched the timeGetTime as a keyword, and it would bring up plenty of information that can possibly solve my problem.
the thing about programming is, that it''s totally experimental. i am not the best programmer. the way i solve my problems is try several things several times. i hit my compile button like crazy. like, if i don''t notice anything on the screen, i change one thing that could possibly be the cause of the error, and then i compile, check it out, if not, then try another thing on your "list of possible reasons why the thing ain''t showing up the screen." try to be experimental with your code. have fun. explore. everyone is a newbie at one time (hopefully when they first enter the forums) and we understand this. i would just hope that you do PLENTY of digging around prior to us giving the solution to your problem.
happy coding, and keep asking those questions. we''ll answer ''em if we can. just do a little bit more digging. it''s part of what a programmer is.
a2k
------------------General Equation, this is Private Function reporting for duty, sir!a2k
Thanks, I used it as a function the first time, but forgot the second.
As for your comment.... I''m learning windows programming at the same time as openGL, so that''s why I have so many questions about it.
And yes, before I post, I sometimes spend hours trying different things. Sometimes I just miss one stupid little thing... =)
As for your comment.... I''m learning windows programming at the same time as openGL, so that''s why I have so many questions about it.
And yes, before I post, I sometimes spend hours trying different things. Sometimes I just miss one stupid little thing... =)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement