I am using Cocoa with Obj C on Mac OSX Tiger. I would like to have Modal alerts in my application. For that purpose I am using NSAlert and associated method beginSheetModalForWindow:modalDelegate:didEndSelector:contextInfo: to create alert dialogs. But by just declaring Code: NSAlert *alertDialog = [[[NSAlert alloc] init] autorelease]; itself is giving the following error: Code: error: parse error before '*' token But I am able to use other alert sheets like NSRunAlertPanel, NSBeginAlertSheet etc. What might be the error in this case and what is the probable solution for this?