So that ted will contain some address value like 345342. I wanted to try and replicate that but there isn't any code to try and implement it; Was this more like pseudocode? Here is an attempt I made to try and print out that address value. Commented out you can see variations that didn't work.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
int main ()
{
char a = 'x';
//int myref; //produces error
//int& myref = 0; //not work
//char myref; //not work
unsignedint& myref = &a;
//myref = &a; //not work
cout << "a is " << a << endl;
cout << "myref is " << myref << endl;
return 0;
}
This is an example that I found which produces similar output