Chapter 3 - p.88 - Online documentation
This is about "Beginning Mac OS X SNOW LEOPARD Programming"...
At Step 12 I get
'Debugging of "Greetings" ended normally. Succeeded'
instead of
'GDB: Program received signal: "EXC_BAD_ACCESS".'
So it seems that I have no errors in the code but therefor I can't continue this exercise. Can somebody tell me what I should change to my code in Greetings.m:
---
#import <Foundation/Foundation.h>
int main (int argc, const char *argv[])
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSString *user = NSFullUserName();
NSString *time = [[NSDate date] descriptionWithCalendarFormat:@"%H:%M:%S %Z"
timeZone:nil
locale:nil];
printf("Hello %s,\n", [user UTF8String]);
printf("It is now %s.\n", [time UTF8String]);
[pool drain];
return 0;
}
---
Thanx for any help.
LuckyLuc
|