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:
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:Code:int EnteroAleatorio(){ rand(); return rand(); }
non-lvalue in assignement
Thanks for your tips and, sorry again about my low knowledge of C ^^