chuckj 0 Posted November 30, 2011 Report Share Posted November 30, 2011 This is only a minor issue which is easily worked around. Using latest BoostC download Ver 7.04 on Windows XP SP2. Compiler gives invalid operand on: short sTest; sTest = -(20); sTest = -(20*10); In general, it looks the compiler does not like unary minus followed by a paren. Thanks, Chuck Quote Link to post Share on other sites
Dave 0 Posted December 3, 2011 Report Share Posted December 3, 2011 This is only a minor issue which is easily worked around. Using latest BoostC download Ver 7.04 on Windows XP SP2. Compiler gives invalid operand on: short sTest; sTest = -(20); sTest = -(20*10); In general, it looks the compiler does not like unary minus followed by a paren. Yes you are right.The problem only occurs when the expression in the parenthesis does not contain a variable. Work around, preceed '-' with a zero, ie: sTest = 0-(20*10); Btw: I've added this to our bugs list. Regards Dave Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.