Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Obj-C... "Incompatible types in initialization" error

My code:

CGPoint *tp_1 = CGPointMake(160, 240);

gives an "Incompatible types in initialization" error... why is this??

like image 421
Boz Avatar asked Apr 30 '26 05:04

Boz


1 Answers

CGPointMake returns a struct, not a pointer to a struct. So the correct code is:

CGPoint tp_1 = CGPointMake(160, 240);
like image 142
mipadi Avatar answered May 02 '26 17:05

mipadi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!