Missing runtime? What can I do?

Jun 22, 2009 at 10:27pm
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 Jun 23, 2009 at 1:02pm
Jun 23, 2009 at 3:05am
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 Jun 23, 2009 at 3:06am
Jun 23, 2009 at 3:16am
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.
Jun 23, 2009 at 9:49am
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 Jun 23, 2009 at 10:12am
Jun 23, 2009 at 12:13pm
That's definitely a missing runtime.
Jun 23, 2009 at 12:51pm
So how do you fix something like that?
Jun 23, 2009 at 1:10pm
What compiler (name and version) are you using?
Last edited on Jun 23, 2009 at 1:20pm
Jun 23, 2009 at 4:15pm
Visual c++ 2008 express edition.
Jun 23, 2009 at 5:44pm
Jun 23, 2009 at 6:44pm
Thank you.
Topic archived. No new replies allowed.