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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T11:24:43+00:00 2026-05-13T11:24:43+00:00

as we use pointers in the argument list of functions like void f(int *);

  • 0

as we use pointers in the argument list of functions like

void f(int *); 

this means that this function will receive a pointer to an integer
but what does this means

void f(int ***); 

and

void f(int **=0)
  • 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-13T11:24:44+00:00Added an answer on May 13, 2026 at 11:24 am
    void f(int ***); 
    

    means that the function receives a pointer to a pointer to a pointer to an int. This would work with it:

    int x=42;
    int *px=&x;
    int **ppx=&px;
    int ***pppx=&ppx;
    f(pppx);
    

    Now about the 2nd one, its a function that receives a pointer to a pointer to an int, and if you give it nothing, it defaults to 0.

    int x=42;
    int *px=&x;
    int **ppx=&px;
    f(ppx);  // pt to pt to x
    f();     // same as f(0)
    

    UPDATE:

    A practical application of this kind of double pointers is a memory allocation routine like:

    bool alloc(T **mem, int count);
    

    This function returns true/false depending on whether or not it worked and would update the pointer you pass in with the real memory address, like this:

    T *mem;
    verify(alloc(&mem, 100));
    

    You pass in an uninitialized pointer and the function can overwrite it with a real value because you passed a pointer to the actual pointer. At the end, mem contains a pointer to valid memory.

    Another application, more common but a lot less enlightening, is an array of arrays (so-called jagged arrays).

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

Sidebar

Related Questions

I use a structure of function pointers to implement an interface for different backends.
On an embedded target I use far pointers to access some parts of the
What pointers do you use to compare between compilers? I'm told gcc is the
I'm curious about conventions for type-punning pointers/arrays in C++. Here's the use case I
I have to use a smart pointer and I found shared_ptr from boost looks
What is a smart pointer and when should I use one?
We use a data acquisition card to take readings from a device that increases
'''use Jython''' import shutil print dir(shutil) There is no, shutil.move, how does one move
Use case: A does something on his box and gots stuck. He asks B
Use case: 3rd party application wants to programatically monitor a text file being generated

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.