Consider my C ++ code below:
int _tmain(int argc, _TCHAR* argv[])
{
int by = 10;
printf("%d\n", by);
int bx = 20;
printf("%d\n", (by + bx));
return 0;
}
which works great. The funniest thing is with the "by" variable. If I try to add a clock for a simple expression that contains, the result will be CXX0030: Error: expression could not be evaluated.
For example, at a breakpoint on return 0, if I add the following hours, I get the results mentioned:
by : 10
bx : 20
by + 5 : CXX0030: Error: expression cannot be evaluated
bx + 5 : 25
by + bx : CXX0030: Error: expression cannot be evaluated
(by) + bx : 30
by + (bx) : CXX0030: Error: expression cannot be evaluated
bx + (by) : CXX0014: Error: missing operrand
This happens on VS2010, VS2008 on multiple computers.
So, more out of curiosity, what happens to "by"? Is this some kind of weird operator? Why doesn't bx get the same treatment?
(I tried Google on this, but itβs pretty hard to get some relevant calls with terms like βbyβ)