You will get this compiler error if the calculator instance variable has not been declared. Check your ViewController.m file and make sure you have this declaration near the top of the file:
@implementation ViewController
{
Calculator *calculator;
}
All the best!
Kevin