Search:

Type: Posts; User: Norm

Search: Search took 0.19 seconds.

  1. Re: Solution for error message: Bad operand for binary operator '-'

    Change the constructor to either of these:



    You need to decide what the creditAcc() method is supposed to do.
    Does it create a new DefinitionAcc1 object
    or update an existing one?

    You...
  2. Re: Solution for error message: Bad operand for binary operator '-'

    Are the two values you want to get the difference of held as Strings and not as numeric values?
    To subtract you will need to convert the Strings to numeric values.
    If the values are already...
  3. Re: Solution for error message: Bad operand for binary operator '-'

    You need methods to work on the contents of class objects.

    Why are you using objects to store numeric values? Why not use primitives like int or double?
  4. Re: Solution for error message: Bad operand for binary operator '-'

    What data types are ba and hm1? The binary operator - takes numeric primitives like int or double.

    What do you want to subtract in that statement? Do your classes have a method that you can call...
Results 1 to 4 of 4