VenDiaS
VenDiaS

Reputation: 81

allocating multiple instance of the same class on the same line

@interface Velocity2 : UIViewController {
UILabel * answerLabel;
UITextField * varA,varB,varC;

Is this legal to do or is below the only way to do it?

    UITextField * varA;
    UITextField * varB;
    UITextField * varC;

Upvotes: 1

Views: 220

Answers (2)

teekay
teekay

Reputation: 1

UITextField *varA, *varB, *varC;

Upvotes: 0

Frank C.
Frank C.

Reputation: 8088

Legal:

UITextField *varA, *varB, *varC;

Upvotes: 3

Related Questions