why can't int type be the iterator in STL vector? -


after chapter vector is the first question on question "c ++ STL" I have no answer Can give And while surfing the Internet, I do not get the answer.

A clear answer to a question (as has been asked) is that an Iterator like an indicator Need to work, so for some arbitrary iterator, * iterator is a valid code (working as a * is an unary operator).

For a int , this will not happen - something like i type int , you * i (except in a reference where * will be interpreted as a binary operator, such as multiplying j * i ).


Comments

Popular posts from this blog

mysql - How to enter php data into a html multiple select box -

java - Can't add JTree to JPanel of a JInternalFrame -

c++ - Cassandra datastax cpp driver - avoiding unnecessary copies -