Missing runtime? What can I do?

I want to time the execution of one of my functions. My best guess to how to do this is by taking the system time, then execute the function, then take the system time again. When this is done you just take the difference betweem the to system times and I got the time I want.

The problem lies in how to integrate and code just that.

http://paste.fllabs.org/-32

That is the code I use to simply count from 0 to 30000.

I am coding in c++ and am writing a .cpp file.

Another thing that bothers me, is that the .exe file based on this function wont execute outside Europe. The PCs can't open it. Why is that?

NoobsDeSroobs
Last edited on
closed account (S6k9GNh0)
You could look into Big O notation and create a small library. Or you can find a couple of the libraries out there that work.

As for the executable problem, post it up, I'll download it, and check it out.
Last edited on
The simple solution is to use system calls such as Windows' Sleep() and POSIX's nano- and microsleep() (there may be a millisleep(), though I'm not sure ATM).

As for the executable thing, there could be a number of reasons. I think the most likely one is that the computers you're sending the executable to don't have the runtime library.
It'd be pretty odd for a program to refuse to run based on geographical location.
The entire code is here:

http://paste.fllabs.org/-39

And the .exe file can be found here:

http://www.megaupload.com/?d=MMCQCUG3

I fixed the timer problem now, but I have not been able to fix the problem with usability. I have not been able to make them execute the program. Now the problem is even worse. I haven't been able to make anyone use the program. I have tried XP and vista computers both inside and outside Europe. This is a new error.

UPDATE:
This is the error they are getting.
"It says that the program configuration is wrong. It may be fixed by reinstalling the program."

NoobsDeSroobs
Last edited on
That's definitely a missing runtime.
So how do you fix something like that?
What compiler (name and version) are you using?
Last edited on
Visual c++ 2008 express edition.
Thank you.
Topic archived. No new replies allowed.