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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T05:37:35+00:00 2026-06-17T05:37:35+00:00

I have a structure as shown. And I am able to initialise or modify

  • 0

I have a structure as shown. And I am able to initialise or modify any of its members normally when I have a pointer to the structure.

struct node{
    int key;
    int nno;
    char color;
    struct node* out;
    struct node* next;
    struct node* pre;
};

But, When I pass an address of the structure pointer to a function and capture the same using a double pointer, and trying to access the members using that double pointer, my compiler is throwing an error ‘member undefined’.

void DFSVisit(struct node** u){
    *u->color = 'g';
    struct node* v;
    while(*u->out != NULL){
            v = *u->out;
                    if(v->color == 'w'){
                            v->pre = *u;
                            DFSVisit(&v);
                    }
    } 
    *u->color = 'b';
}

And, this is how I accessed the function.

DFSVisit(&root);

Root is a pointer properly initialized. And also, Root is a global variable.

  • 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-06-17T05:37:36+00:00Added an answer on June 17, 2026 at 5:37 am

    Are you aware that the indirection (dereferencing) operator, *, has lesser precedence than the element selection operator, ->? That is, you should be writing (*u)->color, not *u->color.

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

Sidebar

Related Questions

I have a html structure shown as image. Is there any way to get
I have a structure like this struct structure { BaseObject &A; //BaseObject has a
I have a structure: typedef struct stock { const char* key1p2; // stock code
I have an array structure like this, which I'm able to print out just
I have a Java project which has this file structure (shown in Eclipse): ProjectName
I have menu structure as show here . All item have a background img.
I have the following structure: in UIActivity1: MyMyProgressDialogFragment progressDialog = MyMyProgressDialogFragment.newInstance(); progressDialog.show(getFragmentManager(),dialog); getFragmentManager().executePendingTransactions(); ..do
I have a controller returning a json structure like so: def show # .......
I have structure like this. <ul class=gallerylist> <li> <image ...> <input ...> </li> <li>
I have below structure <div class=mybox> <div id=imageslide> <a href=><img src=url /></a> </div> </div>

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.