tags:

views:

22

answers:

1

i am declaring cg-point or rect as const it giving above error any one help this,,

#import "newViewController.h"
#import "first.h"

const CGPoint point=CGPointMake(50,50);
+1  A: 

You can't use a function (CGPointMake) as global variable initialization in C.

But you could do it like this:

const CGPoint point = {50.0f, 50.0f};
KennyTM
Thanks kenny..ok can u explain why not use like that..
jeeva
@jeeva: CGPointMake is a run-time function, but C expects a compile-time constant in that initialization call.
KennyTM