خرید بک لینک

Vote count: 0

Hello gentlemen and ladies -

I'm having a hard time figuring out what is wrong with my code. The compiler keeps getting an implicit declaration of function 'clock'[ -Wimpliciit-fucntion-declaration] clock_t start = clock();

and 'CLOCKS_PER_SEC' undeclared

#include <stdio.h>
#include <stdlib.h>


#define N_TIMES     600000
#define ARRAY_SIZE   10000


int main(void)
{
double  *array = calloc(ARRAY_SIZE, sizeof(double));
double  sum = 0;
int     i;

int j;
clock_t start = clock();

for (i = 0; i < N_TIMES; i++) {



        for ( j = 0; j < ARRAY_SIZE; j +=4){


        sum += array[j];
        sum += array[j + 1];
        sum += array[j + 2];
        sum += array[j + 3];


        }


    }

printf ("%.1f secondsn",
    (double) (clock() - start) / CLOCKS_PER_SEC);

return 0;
 }

I've been reading all the related posts and the GNU library but can't figure out the issue.

Thanks in advance.

-Paul

asked 1 min ago

برچسب: trying to use an errordocument to handle,trying to use a recycled bitmap,trying to use big words,trying to use a rubber tonight,trying to use non,existing surface,trying to use an errordocument to handle the request,trying to use the dummy pstream library,trying to use a network resource that is unavailable,trying to use lure module,trying to use someone else's shower, نویسنده: استخدام کار تاريخ: دوشنبه 25 مرداد 1395 ساعت: 12:16

صفحه بندی