Class function problems

Hi, I'm having a problem that seems to have no base.

Inside my class 'binary', I have a function:
 
int getNumber();

This function gets the integer form of the class. Now, for later use, I have several static functions. As they all have the same exact problem, here is the simplest:
1
2
3
static binary add(binary _in1,binary _in2){
    return new binary(_in1.getNumber()+_in2.getNumber);
}

I get the error:
1
2
Invalid conversion from 'binary*' to 'int'
Initializing argument 'binary::binary(int)'

I have the constructor:
 
binary(int number)

All of these are inline functions.

I don't get it. Shouldn't _in1.getNumber() and _in2.getNumber be ints, and the addition of ints are ints, right?

Any help is greatly appreciated!!!
Topic archived. No new replies allowed.