Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > pointer to data member

Thread Tools

pointer to data member

fluteofcoder fluteofcoder is offline
Junior Member
Join Date: Mar 2011
Posts: 2
class x
int i;
int main()
//legal syntax
int x::*ptr=&x::i;
But this syantax is illegal >> int x::*ptr=&(x::i); since i aint static member so i want to know
how actually & and :: operator binds in the expression>>&x::i
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
pointer-to-member data and pointer-to-member functions and access specifiers Stephen Howe C++ 2 11-06-2012 12:32 PM
What is the correct grammar to make a function call by using static member data which is a pointer to a ordinary class member function? C++ 3 07-06-2007 12:50 PM
Class Member Data and Member Function Parameters - Should Parameters Be Data Members? Jason C++ 2 05-13-2006 07:11 AM
pointer to member function and pointer to constant member function Fraser Ross C++ 4 08-14-2004 06:00 PM
How would I use qsort to sort a struct with a char* member and a long member - I want to sort in order of the long member Angus Comber C Programming 7 02-05-2004 06:41 PM