When using this
NSInteger *myInteger = 45 ;
I get the warning message Incompatible Integer to pointer conversion sending 'NSInteger' (aka 'int') to parameter of type 'NSInteger *' (aka 'int *')
I have read another posts with same warning but did not find proper solution.
NSInteger
is not a subclass of NSObject
as it might seem, it's a primitive type. Change your code to:
NSInteger a = 45 ;
And (of course) do not name your variable int
You should use different name then int because it is a name for a special primitive type integer. Like that you cannot name a variable with names like for, while, void... Just use another name(and you should name it to understand what it holds) like:
NSInteger myFirstInteger = 45;
Note: In your future projects, please name your variables with a meaningful name ,so that you can create a meaningful piece of code which is easy to understand and improve.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With