Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6828831
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:25:45+00:00 2026-05-26T22:25:45+00:00

I have a function as follows: -(int)ladderCalc:(NSArray*)amounts percentages:(NSArray*)percentages amount:(int)amount { // Do some stuff

  • 0

I have a function as follows:

-(int)ladderCalc:(NSArray*)amounts percentages:(NSArray*)percentages amount:(int)amount
{

   // Do some stuff

   return foo;
}

I have declared like this in the header file:

-(int)ladderCalc:(NSArray*)amounts percentages:(NSArray*)percentages amount:(int)amount;

But I am getting an error “implicit declaration of function is invalid in c99” when I try to use the int value returned elsewhere in the same file. Am I not declaring the function correctly?

UPDATE

I am realizing that I am not declaring this in the standardized way, I changed my declaration to MarkGranoff’s recommendation (see the changes above) but I am still getting it as a warning this time.

Here is the context of how I am calling this function:

-(int)fooTotal: (int)amount 
{

   int totalFee = 0;

   // Declare arguments
   NSArray *percentages = [[NSArray alloc] initWithObjects:firstValue, secondValue, thirdValue, fourthValue, fifthValue, nil];
   NSArray *amounts = [[NSArray alloc] initWithObjects:sixthValue, seventhValue, eigthValue, ninthValue, nil];

   totalFee = ladderCalc(amounts,percentages,amount);

   return totalFee;
}

So, I am still getting a warning even though this seems to make sense as far as Obj-C style is concerned.

I am pretty sure I am not calling this function correctly, I am getting an unrecognized symbol error when I compile the project.

Undefined symbols for architecture i386:
  "_ladderCalc", referenced from:
      -[FeeCalcLibrary getMFModelTotal:] in FeeCalcLibrary-A83D2A7637F57664.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T22:25:45+00:00Added an answer on May 26, 2026 at 10:25 pm

    Try this instead:

    -(int)ladderCalc:(NSArray*)amounts percentages:(NSArray*)percentages amount:(int)amount;
    

    and change the signature of the implementation to match. Then you have arguments with names you can reference in the code of the method. Namely: amounts, percentages, and amount.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have function public Menu Details(int? id) { return _dataContext.Menu.Include(ChildMenu).FirstOrDefault(m => m.MenuId == id);
I have memoized the factorial function in C as follows: int fact(int n) {
I have a recursive function from a C book as follows: void print(int a[],
I have a C function defined as follows: int s3vold_(void) {...} To create a
If I have a prototype that is declared as: void foo(int (*fi)(void *, void
Suppose I have a function f(n:Int):Option[String] . I would like to find such 1
I have a function frequencyBy which I would like to parallelize. Here follows a
I have a function in a native DLL defined as follows: #include <string> void
I have a DLL which provided a decoding function, as follows: function MyDecode (Source:
I have code as follows: $(#item_select).change(function() { var params = $(#item_select option:selected).val(); $.post('/account/ar_form.php', {idata:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.