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 66351
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T19:05:23+00:00 2026-05-10T19:05:23+00:00

I have seen a function whose prototype is: int myfunc(void** ppt) This function is

  • 0

I have seen a function whose prototype is:

int myfunc(void** ppt) 

This function is called in a C file as a = myfunc(mystruct **var1);

where mystruct is typedef for one of structure we have.

This works without any compilation errors in MSVC6.0, But when I compile it with some other C compiler, it gives an error at the place where this function is called with error message:

Argument of type mystruct ** is incompatible with parameter of type void **

The argument of myfunc() is kept as void** because it seems to be a generic malloc kind of function to be called with various structure variable types for memory allocation

  1. Is there any type such as void ** allowed in C standard/any C compilers?
  2. How do I fix this? [I tried casting the function call argument to mystruct**, but it didn’t work]

-AD

  • 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. 2026-05-10T19:05:23+00:00Added an answer on May 10, 2026 at 7:05 pm

    void** is valid but, based on your error message, you probably have to explicitly cast the argument as follows:

    mystruct **var1; x = myfunc ((void**) var1); 

    That’s because the myfunc function is expecting the void** type. While void* can be implicitly cast to any other pointer, that is not so for the double pointer – you need to explicitly cast it.

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

Sidebar

Ask A Question

Stats

  • Questions 63k
  • Answers 63k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer If you re-use the same certificate request, the key will… May 11, 2026 at 10:34 am
  • added an answer Having done it both ways, I prefer #2. It'll do… May 11, 2026 at 10:34 am
  • added an answer lock xadd is your friend. May 11, 2026 at 10:34 am

Related Questions

I have seen a function whose prototype is: int myfunc(void** ppt) This function is
I have seen a few mentions of this idiom (including on SO ): //
I have seen a lot of discussions going on and people asking about DataGrid
I have seen a codebase recently that I fear is violating alignment constraints. I've
I have seen a lot of ob_get_clean() the last while. Typically I have done
I have seen a few different in-process SQL databases for .NET (including one from
Lately I have seen a lot of blog posts concerning how to build loosely
Possible Duplicate: Split string in SQL I have seen a couple of questions related
I have never seen a way to do this nicely, i would be interested
I am aware of CocoaMySQL but I have not seen a Mac GUI for

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.