so how should i do that? where should i put the GetTickCount
Main Topics
Browse All Topicscan someone tell me why my code run so slow for the background subtraction? Is there any ways to make it faster?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
>>> hmm.. i use it on other computer it doesn't lag
If hardware is similar, check event viewer if there are error events on some devices.
You invoke event viewer by CTRL+R and input eventvwr. The System and Application tab are the interesting ones.
If hardware is not comparable, you should follow the advice Andy gvae you and spot the calls which were slow.
>>>hmm.. now i use vs c++ 6.0 then it can work.
?
The version of VC you use should make no (or minimal) difference to how fast your code runs.
Stop and think.
You have a problem. Step 1 is to identify the problem (which lines of code take a lot of time) then you can start working on a solution. Just guessing at what is slow will very likely waste your time unless you happen to guess correctly.
>>>hmm.. now i use vs c++ 6.0 then it can work.
If the code compiles both with VC6 and younger VC compiler (VS.NET), the differences are minimal. STL is more compliant to standard with every version VC7.0, VC7.1, VC8 and VC9. Differences in runtime are enhancements which can't apply for you if the code still compiles with VC6.
Business Accounts
Answer for Membership
by: AndyAinscowPosted on 2009-08-11 at 23:10:52ID: 25076064
First - identify the slow part of your code. (GetTickCount returns the number of milliseconds since windows started, put a number of lines in to see the time taken between code sections)