I've looked around gamedev some and it seems like there's a really supportive community, so I decided to try getting support on this error I'm getting.I'm learning C from a book; I'm just beginning in it, so this is a really simple program. The idea is: the user enters a number, which the computer guesses at. However, in the section where I'm modifying the ai's guessing logic, I'm getting an error I can't find a good way to get around. I included a picture of the code and error. When I hover my mouse over the variables 'guess' in the arithmetic within the 'if' blocks, it says: 'Error: Expression must be a modifiable lvalue'I would really appreciate an explanation of what that means and maybe a suggestion to fix it.Many thanks in advance for helpful replies.

Expression Must Be Modifiable Value
- Ok, the codes are: vector imageFiltered; // some processing codes here parallelfor( blockedrange(0,.
- How can the answer be improved?


Sep 08, 2011 So, as an educational experience, I am making my own rudimentary Vector class using malloc (yes I know, not the wisest of moves, however, as I said, this is an educational experience.).
Code: scanf('%s', filename);fflush(stdin);fr = fopen(filename, 'rt');First line could lead to seg faults, as it's an unsafe way of reading a string. You know how fgets works, so why are you using scanf here?Second line is not valid in pure, standard C, but only allowed in some compilers by extension. It may or may not do what you think it will.The third line, while perhaps redundant with the 't' parameter, is never checked to see if the operation succeeded. You should probably be checking to see if fr is NULL.