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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:33:30+00:00 2026-05-26T04:33:30+00:00

struct Values { char *pValue; //character string int nBytes; //amount of bytes }; struct

  • 0
struct Values {
char *pValue;   //character string
int nBytes; //amount of bytes
};

struct Movie {
Values *pMovieTitle;    //Name of Movie
};

Movie *myMovie;

1) What is the equivalent syntax of this line of code using the * and . operators?

myMovie->pMovieTitle->pValue;

I tried

(*myMovie).pMovieTitle->pValue

which works, however

(*myMovie).(*pMovieTitle).pValue

Doesn’t work.

2) Why are there two arrow operators when there are three pointers? myMovie, pMovieTitle and pValue are all pointers.

For example there are two arrow operators for this line of code:

myMovie->pMovieTitle->pValue;

and there are two arrow operators for this line of code:

myMovie->pMovieTitle->nBytes;

Even though pValue is a pointer and nBytes is not.

  • 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-26T04:33:31+00:00Added an answer on May 26, 2026 at 4:33 am
    1. Your second attempt should be (*(*myMovie).pMovieTitle).pvalue; you can’t dereference a struct member, only the value returned after accessing said member.

    2. The fact that pValue is a pointer is irrelevant; -> is used when the object on the left is a struct pointer, regardless of the type of the member named on the right.

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

Sidebar

Related Questions

I have a structure like struct board{ char name; int values[37]; }board Imagine a
struct MyRect { int x, y, cx, cy; char name[100]; }; int main() {
struct Structure { // Structure(const char* n, int v, bool a) : name(n), value(v),
I have this: struct myClass{ multiset<string,binPred<string> > values ; myClass(const char param1, const char
typedef struct child {int count; char word[100]; inner_list*next;} child; typedef struct parent { char
struct Record { char Surname[20]; char Initial; unsigned short int Gender; //0 = male
typedef struct Value{ int id; char type; char a; } Value; void fooV(Value v){
How can I assign values to struct member character by character . I would
I have a structured defined as typedef struct{ char string1 char string2 int number1
Assuming I have a struct like the following: struct Struct { char Char; int

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.