Computer Science Canada l-values? |
Author: | apomb [ Thu Mar 03, 2005 1:00 pm ] |
Post subject: | l-values? |
i keep getting the error "left operand must be l-value" in VC++ 6 ... please help |
Author: | wtd [ Thu Mar 03, 2005 1:23 pm ] |
Post subject: | Re: l-values? |
When you assign to something, that something has to be something you can assign to. Such things are often called l-values. Show me your code. |
Author: | apomb [ Thu Mar 03, 2005 6:56 pm ] |
Post subject: | |
I'm at home right now, when i go back to school, ill post it, untill then, can you explain your explination again? ... all i got out of it was "show me your code" ![]() |
Author: | wtd [ Thu Mar 03, 2005 9:16 pm ] | ||||||||
Post subject: | |||||||||
say you have
"foo" is an l-value you can assign to.
But, if you have a function which returns an int, well you can't assign to that.
The last doesn't work. |
Author: | apomb [ Fri Mar 04, 2005 6:16 pm ] |
Post subject: | |
hmm, seems thats the thing ... ill try to rearrange the initialization of my varibles. |
Author: | wtd [ Fri Mar 04, 2005 6:18 pm ] |
Post subject: | |
If you show me the code I can probably help you better, since I don't know which mistake you're making. ![]() |