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

php - How to pass multiple values from url -

php - Laravel not returning controller -

c# - Confused on how to specify a Platform and Version while using ChromeOptions for RemoteWebDriver with Selenium donNet since recent updates -