C helper function


#1

Hello!

Can anyone explain to me the declaration of the helper function. More specifically why is the function declared with an asterisk ? And why not just declare it as a regular Objective C function. It returns an NSString, so why does it have to be a C function?


#2

[quote]
…More specifically why is the function declared with an asterisk ? And why not just declare it as a regular Objective C function. It returns an NSString, so why does it have to be a C function?

[/quote]The declaration says the the function returns an NSString object. It is a free-standing function in that it is not tied to any object.

However, If you prefer the Objective-C syntax, you can write it like this as a class method:

@interface MyHelper : NSObject

+ (NSString *)BNRDocPath;

@end

But declaring it in C-style is much easier.


#3

Thank you!