How do I assign the value from a function to a variable?
Hi! Im starting with C so sorry about my low knowledge of this. Like I said in the title, how do I assign the value from a function to a variable? I mean I have this function:
Code:
int EnteroAleatorio(){
rand();
return rand();
}
and I would like to assing the value of EnteroAleatorio to a variable in my main function, but when I try to do it and compile, I got the next error:
non-lvalue in assignement
Thanks for your tips and, sorry again about my low knowledge of C ^^