Hello I'm using the random number function to try to multiply the values in the array O by a random number but receive the error - invalid operands to binary error*. Thanks for any help.
Cheers
Chris
Code:
#include <stdio.h> #include <stdlib.h> double O[1][6] = {{1, 1, 1, 1, 1, 1}}; /*********** random number generator *******************/ double srandom() { return 2*((rand()/(double)RAND_MAX) - 0.5); } /**************** main ********************************/ int main() { double z [1][6]; zrandom = O * frand(); }
Chris
Comment