l-values?
Author |
Message |
apomb
![](http://compsci.ca/v3/uploads/user_avatars/6489609347028a0f2422f.png)
|
Posted: 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 |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
wtd
|
Posted: 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. |
|
|
|
|
![](images/spacer.gif) |
apomb
![](http://compsci.ca/v3/uploads/user_avatars/6489609347028a0f2422f.png)
|
Posted: Thu Mar 03, 2005 6:56 pm Post subject: (No 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" ![Laughing Laughing](http://compsci.ca/v3/images/smiles/icon_lol.gif) |
|
|
|
|
![](images/spacer.gif) |
wtd
|
Posted: Thu Mar 03, 2005 9:16 pm Post subject: (No 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.
code: | int bar() { return 42; } |
The last doesn't work. |
|
|
|
|
![](images/spacer.gif) |
apomb
![](http://compsci.ca/v3/uploads/user_avatars/6489609347028a0f2422f.png)
|
Posted: Fri Mar 04, 2005 6:16 pm Post subject: (No subject) |
|
|
hmm, seems thats the thing ... ill try to rearrange the initialization of my varibles. |
|
|
|
|
![](images/spacer.gif) |
wtd
|
Posted: Fri Mar 04, 2005 6:18 pm Post subject: (No subject) |
|
|
If you show me the code I can probably help you better, since I don't know which mistake you're making. ![Smile Smile](http://compsci.ca/v3/images/smiles/icon_smile.gif) |
|
|
|
|
![](images/spacer.gif) |
|
|