A question on vectors, pointers and iterators
Posted
by xbonez
on Stack Overflow
See other posts from Stack Overflow
or by xbonez
Published on 2010-05-19T00:30:46Z
Indexed on
2010/05/19
0:40 UTC
Read the original article
Hit count: 265
c++
Guys, I have a midterm examination tomorrow, and I was looking over the sample paper, and I'm not sure about this question. Any help would be appreciated.
Let v
be a vector<Thingie*>
, so that each element v[i]
contains a pointer to a Thingie
. If p
is a vector<Thingie*>::iterator
, answer the following questions:
- what type is
p
? - what type is
*p
? - what code provides the address of the actual
Thingie
? - what code provides the actual
Thingie
?
© Stack Overflow or respective owner