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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T09:17:00+00:00 2026-05-11T09:17:00+00:00

So, I saw this: error:(NSError **)error in the apple doc’s. Why two stars? What

  • 0

So, I saw this:

error:(NSError **)error 

in the apple doc’s. Why two stars? What is the significance?

  • 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-11T09:17:00+00:00Added an answer on May 11, 2026 at 9:17 am

    A ‘double star’ is a pointer to a pointer. So NSError ** is a pointer to a pointer to an object of type NSError. It basically allows you to return an error object from the function. You can create a pointer to an NSError object in your function (call it *myError), and then do something like this:

    *error = myError; 

    to ‘return’ that error to the caller.


    In reply to a comment posted below:

    You can’t simply use an NSError * because in C, function parameters are passed by value—that is, the values are copied when passed to a function. To illustrate, consider this snippet of C code:

    void f(int x) {     x = 4; }  void g(void) {     int y = 10;     f(y);     printf('%d\n', y);    // Will output '10' } 

    The reassignment of x in f() does not affect the argument’s value outside of f() (in g(), for example).

    Likewise, when a pointer is passed into a function, its value is copied, and re-assigning will not affect the value outside of the function.

    void f(int *x) {     x = 10; }  void g(void) {     int y = 10;     int *z = &y;     printf('%p\n', z);    // Will print the value of z, which is the address of y     f(z);     printf('%p\n', z);    // The value of z has not changed! } 

    Of course, we know that we can change the value of what z points to fairly easily:

    void f(int *x) {     *x = 20; }  void g(void) {     int y = 10;     int *z = &y;     printf('%d\n', y);    // Will print '10'     f(z);     printf('%d\n', y);    // Will print '20' } 

    So it stands to reason that, to change the value of what an NSError * points to, we also have to pass a pointer to the pointer.

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

Sidebar

Related Questions

When i try to debug using Firebug , i saw this 414 error. In
Recently i saw this piece of code. Shouldnt this line be a compile error?
I saw this C# using statement in a code example: using StringFormat=System.Drawing.StringFormat; What's that
I saw this question and it motivated me to look again (without success) at
I saw this posting which explained how to get BC3 working as the diff
i saw this In MySQL, joins work for INSERT, UPDATE, and DELETE statements. It's
I saw this in a answer by Marc Gravell, and I just don't see
just saw this comment in a what JS lib do you use poll @Xanti
I saw this on a CMS(sitecore) based Asp.net 2.0 Webform based site. <a class=boardTextLink
I saw this HTML minifier in Ajaxian and it made me wonder if its

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.