c++ - Stream insertion combined with postfix operators -



c++ - Stream insertion combined with postfix operators -

say reading info in indexing starts @ 1. want indexing 0 based.

why not acceptable utilize postfix increment/decrement operators after stream insertion operator?

int a; std::cin >> a--;

the result of post-increment operator temporary object, if increment strictly applied @ end of expression. read value, lvalue needed temporary objects aren't lvalues: bound go away. note, you'd read value temporary, retaining unspecified value in a.

c++ operators postfix-operator

Comments

Popular posts from this blog

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -