12.05.2015 Views

type - David Vernon

type - David Vernon

type - David Vernon

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Lvalues<br />

• The conditional expression E1 ? E2 : E3 is an<br />

lvalue only if E2 and E3 are of the same <strong>type</strong><br />

and are both lvalues<br />

– NB: this is a C++ feature; conditional expressions<br />

cannot be lvalues in C<br />

• The results of a cast is not an lvalue (except in<br />

the case of reference <strong>type</strong>s, yet to come)<br />

float(x) = 3.14; // error<br />

Copyright © 2007 <strong>David</strong> <strong>Vernon</strong> (www.vernon.eu)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!