Original Post
struct test
{
test( int& ref ) : i( ref ) {}
int& i;
};
int main( int argc, char** argv ) {
int i = 0;
test t( i );
const test& tr = t;
tr.i = 4;
return 0;
}
With your permission, GameDev.net uses analytics cookies to understand how people use the platform. You can accept analytics or continue with necessary cookies only. Learn more