Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

c++ reference

int x = 5;
int &y = x;

cout << "The value of x is " << x << endl;
cout << "The value of y is " << y << endl;

y++;

cout << "The value of x is " << x << endl;
cout << "The value of y is " << y << endl;
 
PREVIOUS NEXT
Tagged: #reference
ADD COMMENT
Topic
Name
2+7 =