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

  • SEARCH
  • Home
  • 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 7173385
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T15:48:48+00:00 2026-05-28T15:48:48+00:00

I developed a mechanism for function callback. This is my function. int function_root(var1,var2, int(*callback)(),

  • 0

I developed a mechanism for function callback. This is my function.

int function_root(var1,var2, int(*callback)(), ...);

so if var1=var2 then callback(va_arg list);

For example:

function_root(a,b,fun_clbck,x,y,z); //if a=b
we will get this: fun_clbk(x, y, z);

Problem is. When my function callback have at least one argument. I get a warning incompatibility with prototype

I think the problem is in my function root. I declared int(*callback)() with zero parameter and once I do a callback like fun_clbck(int,int,int); it triggers that problem.

  • 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-28T15:48:48+00:00Added an answer on May 28, 2026 at 3:48 pm

    i declared int(*callback)() with zero parameter

    That’s not true. int(*callback)() is not a C89/C99 prototype; it declares a function pointer to something returning int, without specifying types of parameters. The proper declaration for a function pointer with no arguments would be

    int (*callback)(void)
    

    and once i do a callback like fun_clbck(int,int,int); it trigger that problem

    Obviously. The parameter types declared for the callback function must match that in the call. Rethink your design, e.g. use a variable number of arguments:

    int (*callback)(unsigned, ...)
    

    and pass the number of actual arguments as the first parameter.

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

Sidebar

Related Questions

I have developed a simple mechanism for my mvc website to pull in html
I've developed a print mechanism for an intranet application running over HTTPS. Using javascript
I developed a win forms app targeting .net 2.0. All of this is in
I wanted to ask for some logging mechanism or framework with specific function. I
Is there a mechanism to use Facebook Connect to authenticate via a custom developed
Has anyone developed a dynamic reload mechanism for the apache commons database configuration object?
This is an odd one. I developed a simple iPhone application for management at
We developed a website for a client and he has purchased the .com, .net,
I developed a greasemonkey script that refreshes a page and checks for certain updates.
I developed in ASP.NET 2.0 for some time, and for slightly less time in

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.