I am modifying some code (which I did not originally code) and have come in to this error upon compiling:

Code:
Lvalue required as left operand of assignment
The problem occurs here:

Code:
temp + mat_col = (1.0 +  10.0 * rand() / ( RAND_MAX + 1.0 ) );
where

Code:
float*     temp;
temp = (float*) malloc(Order(local_A)*sizeof(float));
and

mat_col is the index of the for loop where the aforementioned error occurs

Code:
for(mat_col = 0; mat_col < Order(local_A); mat_col++)
		temp + mat_col = (1.0 +  10.0 * rand() / ( RAND_MAX + 1.0));
I am very confident that I am missing some subtlety with a pointer. I looked up this error it it seemed like it was a typecasting error but I don't see how that is the issue. Maybe 1.0 and 10.0 are treated as doubles by the computer and not floats - I feel like I might have read that before. Any suggestions? Thanks!