i just read this chapter and started with the next where we gonna create a text file. I wanted to combine both chapters and use a constant as my path value. Unfortunately my implementation does not work. Can someone give me hint what I'm doing wrong?
Here is my sample:
int main (int argc, const char * argv)
NSString const *path = @"/Users/foo/temp/cool.txt";
NSMutableString *str = [[NSMutableString alloc]init ];
for(int i=0; i<10; i++)
[str appendString:@"Aaron is cool!\n"];
NSLog(@"done writing %@",path);
Here is the error:
Sending const NSString *__strong to parameter of type NSString * discards qualifiers
I used the implementation from the book. I thought I'm sending a NSString as a message to the method and not a const. What I'm doing wrong?