mparrish91 mparrish91 - 1 year ago 194
Objective-C Question

LinkedList Objective C - Implicit declaration of function invalid in c99

referencing this post - link

I have my function declared in my header file, however the error -"Implicit declaration of function invalid in c99" still shows. I am not sure however if that is ultimately what is causing my final error which is "ld: symbol(s) not found for architecture x86_64"

I tried changing the architecture in build settings to 386, without luck.

enter image description here

enter image description here

Tim Tim
Answer Source

Calling an Objective-C method looks different than calling a C function. In this instance, you've written a method -printKthToLast:withHead:, and you'll need to call it on an object like so:

int index = [self printKthToLast:k] + 1;

Note the use of square brackets around the entire method call; the receiver, in this case self; the individual argument labels; and the lack of parentheses.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download