Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   C++ (http://www.velocityreviews.com/forums/f39-c.html)
-   -   pointer to data member (http://www.velocityreviews.com/forums/t744641-pointer-to-data-member.html)

fluteofcoder 03-05-2011 07:43 PM

pointer to data member
 
Code:

class x
{
public:
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


All times are GMT. The time now is 08:46 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.