Thread: LValue Required
View Single Post
  #2 (permalink)  
Old 07-05-2008, 01:52 AM
v0id's Avatar   
v0id v0id is offline
Retired
 
Join Date: Apr 2007
Location: Denmark
Posts: 2,629
Last Blog:
CherryPy(thon)
Rep Power: 28
v0id is a glorious beacon of lightv0id is a glorious beacon of lightv0id is a glorious beacon of lightv0id is a glorious beacon of lightv0id is a glorious beacon of lightv0id is a glorious beacon of light
Send a message via MSN to v0id
Default Re: LValue Required

The minus-operator is read from right to left, and in your code does one of the minus-operations miss a value on the left side. It's on line six, where you're having to minus-operators in a row:
Code:
i = a - - b;
Either remove one of the minuses, or put something in between. Here is it with one of them removed:
Code:
i = a - b;
That would work.

Another thing is your coding style. You should try staying to the standards, and don't be using non-compiler-independent libraries like conio.h. Your main-function is also wrong. It shall return an integer, and not nothing.
__________________
05-03-2007 - 11-13-2008
Reply With Quote