Hi everyone,
I know Objective-C allows you to use C functions as it is just an extension of C but is it bad practice to do so? I just don't often see it in tutorials (if ever) and searching the topic brings up few results.
Part of the reason I ask is I have a function that takes in several arguments, one of which is a array of floats that has an indeterminate size before runtime. When I wrote this as a ObjC method:
it refuses to compile due to using b[] it would seem. However writing as a C function:
it compiles fine.
Any ideas?
Cheers,
Aly
I know Objective-C allows you to use C functions as it is just an extension of C but is it bad practice to do so? I just don't often see it in tutorials (if ever) and searching the topic brings up few results.
Part of the reason I ask is I have a function that takes in several arguments, one of which is a array of floats that has an indeterminate size before runtime. When I wrote this as a ObjC method:
Code:
-(float)MyFunctionWitha: (int) a andB (float) b[]
Code:
float MyFunction(int a, float b[])
Any ideas?
Cheers,
Aly