mercredi 13 janvier 2016

rand function c args

I have a multi task application based on DTW(Dynamic Time Wrapping) that has this code line:

void randPattern(int in[SIZE][SIZE]){
int i,j;

for(i=0; i<SIZE; i++){
    for(j=0; j<SIZE; j++){
        in[i][j] = abs(rand(23, 2, 100)%5000);
    }
}
}

So, when i tried to compile with "arm-none-eabi-gcc" this returns:

error: too many arguments to function 'rand'

What i can do to solve this message or what i can use instead this function. If someone have an explanation... Thanks for attention




Aucun commentaire:

Enregistrer un commentaire