Hi,
Silly as it may sound, I am trying to write a simple fuction in objective-c which returns a string and displays it, the following code nearly works but I can't get printf to accept the functions return value ...
NSString* getXMLElementFromString();
int main(int argc, char *argv[])
{
printf(getXMLElementFromString());
return NSApplicationMain(argc, (const char **) argv);
}
NSString* getXMLElementFromString() {
NSString* returnValue;
returnValue = @"Hello!";
return returnValue;
}
Any help out there would be much appreciated.
Richie.