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
Post a Comment