Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

cpp class access array member by different name

struct U
{
    int   v[2];
    int&  x;
    int&  y;
};

U::U()
    : x(v[0])
    , y(v[1])
{}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #cpp #class #access #array #member
ADD COMMENT
Topic
Name
4+6 =