Ah, the problem is simply that you've forgotten to put the things in the if block in {}
Code:
void abc::opget()
{
if ( strcmp (op1, "-") == 0 && strcmp (op2, "-") == 0 )
{
num1 = num1 * -1;
num2 = num2 * -1;
}
else if ( strcmp (op1, "-") == 0 )
num1 = num1 * -1;
else if ( strcmp (op2, "-") == 0 )
num2 = num2 * -1;
}
If the code that you want associated with the if is 1 line long, then you don't need {}; but if it's more than one line then you need to enclose it in {}. The same goes for else if and else blocks.
You might also like to consider indenting your code (for an example of one indenting scheme you might use, refer to the code I posted), as it makes code much much much easier to read.
**EDIT**
As a side note, you don't need to say num1 * -1; you can simply do:
num1 = -num1;