Link to home
Create AccountLog in
Avatar of jr_barros_jr
jr_barros_jr

asked on

NSString @interface MyCalculatorViewController : UIViewController

I am getting the following error in line:

NSString *Teste=@"teste"; //Error is here

error: expected ':', ',', ';', '}' or '__attribute__' before '=' token

How can I solved it?

Thanks
//
//  MyCalculatorViewController.h
//  MyCalculator
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "MyCalculatorBrain.h"

@interface MyCalculatorViewController : UIViewController {
	
	
	IBOutlet UILabel *MyDisplay;
	MyCalculatorBrain *MyBrain;
	NSString *Teste=@"teste"; //Error is here
	
}

- (IBAction)PressionarDigito:(UIButton *)sender;
- (IBAction)PressionarComando:(UIButton *)sender;

@end

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of SpeedyApocalypse
SpeedyApocalypse
Flag of Canada image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account