myString =[[NSString.... doubts


#1

In this code:

myString = [[nSString alloc] initWithString:@“Hello, World!”];
len = [myString lenght];

why dont we need to put NSString plus the pointer * at the very begging?, like this:

NSString *myString = [[nSString alloc] initWithString:@“Hello, World!”];
len = [myString lenght];

thanks!!


#2

Yes you can do that, it is just you have declared a NSString pointer before…


#3

oki!!..I didn’t understand it like that because in the first declaration you already initialized it…so I thought they where separate ideas…

thanks!