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

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

The Archive Base Latest Questions

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

I confused when I try to understand the code below. Can anyone explain this

  • 0

I confused when I try to understand the code below. Can anyone explain this hack:

a.*b

Or if a is a pointer to a class:

a->*b
  • 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-10T05:17:45+00:00Added an answer on June 10, 2026 at 5:17 am

    Both of those operators are used to dereference a pointer-to-member. Unlike regular pointers, pointer-to-members cannot be dereferenced by themselves, but must be applied to an actual object of the type. Those binary operators pick the object (or pointer) in the left hand side and apply the pointer to member to it.

    struct test {
        int a, b, c;
    };
    int main() {
       int test::*ptr;
       ptr = &test::a;
       test t;
       t.*ptr = 5;         // set t.a to 5
       ptr = &test::b;
       test *p = &t;
       p->*ptr = 10;       // set t.b to 10 through a pointer
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can someone explain the code below? I get confused when I try to understand
This is silly, but i can't understand how to do it. Checked out from
I'm just starting to try to pick up the J language, and am confused
confused - given a track uri, I can get one album but possibly more
Pretty confused right now, while i feel i know a bit about vhosts this
I confused when i want to take single pointer and when should i take
I did a simple test to understand how transactions work in .net Sample code
this code works fine: procedure TForm2.Timer1Timer(Sender: TObject); var Text: string; begin SetLength (Text,555); GetWindowText
Bit confused with this one. Basically, I have a column in a table, and
My class extends SimpleCursorAdapter. In that class I try to get CallLog into ListView

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.