Finding Program Running Time
Hi, I'm a new C student, and I need to find out how long my program takes to run. i'm using the following code, but I get a ton of C2143 errors when I use this. When I don't use anything in <time.h>, my program compiles, and works perfectly. I'm using MS Visual C++ (even though I'm trying to program in C).
Is there a problem with my code?
int main ()
clock_t start, end;
start = clock();
/* my actual program */
end = clock();
runTime = ((end – start) / (double) CLOCKS_PER_SEC );
printf (“Run time is %g seconds”, runTime);