compile error

This is a discussion on compile error within the C++ Programming forums, part of the General Programming Boards category; I am getting a compiler error (error C2106 "left operand must be l-value") in developer studio 6.0. the left side ...

compile error

I am getting a compiler error (error C2106 "left operand must be l-value") in developer studio 6.0. the left side of my equation is an enum type that I cast to an int. The right side of the equation is of int type. What am I doing wrong? Thanks in advance.
JK

I think your problem is coming from typecasting on the left side of the equation. The left side is the assignment side - nothing should change. Give us the actual line of code and explain what you're doing and perhaops we can offer an alternative.

instead of putting the code here, first, would you provide an example of how to properly do what I am trying to do...that is to say: I have an enum type on the left side = to an int type on the right side...example of how this is accomplished.