linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Darío Mariani" <mariani.dario@gmail.com>
To: Shriramana Sharma <samjnaa@gmail.com>
Cc: linux-c-programming@vger.kernel.org
Subject: Re: Errors with ->*
Date: Tue, 2 Aug 2011 14:47:37 -0300	[thread overview]
Message-ID: <CAPHC=MBpmL2GCRYYuRt_U5OY5nCGsESKLkvPVcXk9Qe4pq9NgA@mail.gmail.com> (raw)
In-Reply-To: <4E382646.7060903@gmail.com>

Line 9 should be:
int * xptr, * yptr ;
You forgot a '*'. About the rest, you are using the pointer to members
incorrectly, look at
http://www.google.com/search?q=pointer+to+member for examples and usage.
Darío

On Tue, Aug 2, 2011 at 13:31, Shriramana Sharma <samjnaa@gmail.com> wrote:
> Hello -- long time since I posted on this list.
>
> I'm trying to understand the use of ->* but in compiling the attached
> program which I thought was straightforward I am getting the following
> errors:
>
> foo.cpp: In constructor ‘mystruct::mystruct()’:
> foo.cpp:9:12: error: invalid conversion from ‘int*’ to ‘int’
> foo.cpp: In function ‘int main()’:
> foo.cpp:21:7: error: ‘xptr’ was not declared in this scope
> foo.cpp:22:7: error: ‘yptr’ was not declared in this scope
>
> Please help.
>
> --
> Shriramana Sharma
>
--
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2011-08-02 17:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-02 16:31 Errors with ->* Shriramana Sharma
2011-08-02 16:54 ` Aniruddha Bhattacharyya
2011-08-02 16:55   ` Aniruddha Bhattacharyya
2011-08-02 17:47 ` Darío Mariani [this message]
2011-08-02 20:52 ` Glynn Clements
2011-08-03  3:57 ` Shriramana Sharma

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAPHC=MBpmL2GCRYYuRt_U5OY5nCGsESKLkvPVcXk9Qe4pq9NgA@mail.gmail.com' \
    --to=mariani.dario@gmail.com \
    --cc=linux-c-programming@vger.kernel.org \
    --cc=samjnaa@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).