I just started with OBJ-C yesterday (coming from 10+ years of php).
I started reading a pdf on OBJ-C that suggested I check out C first, so I read a pdf on C.
From what I understand, C could not really handle strings, so what it does is it creates an array of separate characters and returns the pointer for the first character (is this correct?)
Based on that (and taking into account I come from a very long background of PHP where variables don't need to be declared, types can be changed whenever needed, types can change automatically, etc)
Is this C issue with strings still in effect?
I ask this because xcode will give me an error if I try to do this:
NSString var1 = @"Hello World";
but this works
NSString *var1 = @"Hello World";
It's baffling my mind mainly because I sort of feel things should be more evolved now (like in C# where pointers are no longer an issue)
Is there a way to keep things simpler in OBJ-C ? (i.e., what gest to me is the fact that an int can be int var1 = 1; but strings must be pointers?
thanks, and sorry if this sounds a bit off the top and confusing (but year, I am confused.)