Paul
unread,Jun 11, 2015, 1:11:31 PM6/11/15You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
The below appears (to me) to contain an error. Please could someone confirm if there's an error? Otherwise, I need to review my understanding of some basics. Thank you. I would have thought that &x denotes the address of a variable and is therefore not an lvalue. This is not given as an error in the online errata list.
Thanks again for your help.
BEGIN QUOTE
vector<string> arr( 3 );
const int x = 2;
int y;
...
int z = x + y;
string str = "foo";
vector<string> *ptr = &arr;
With these declarations, arr, str, arr[x], &x, y, z, ptr, *ptr, (*ptr)[x] are all lvalues.
END QUOTE