 |
C++Talk.NET C++ language newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Guest
|
Posted: Fri May 11, 2007 9:11 am Post subject: save iterator as a DWORD |
|
|
Hi all !
I have a small trouble with iterators... Can you help me please.
The problem:
typedef std::map<int, int> M;
M m;
M::iterator i = m.begin();
DWORD d = (DWORD)i._Mynode();
M::iterator i2((M::_Imp::_Nodeptr)d); // <-- here i want to have an
iterator which point to same position as i
but _Nodeptr is protected type...
How to solve it ?
Alex |
|
| Back to top |
|
 |
Ian Collins Guest
|
Posted: Fri May 11, 2007 9:11 am Post subject: Re: save iterator as a DWORD |
|
|
kubrinsky (AT) gmail (DOT) com wrote:
| Quote: | Hi all !
I have a small trouble with iterators... Can you help me please.
The problem:
typedef std::map<int, int> M;
M m;
M::iterator i = m.begin();
DWORD d = (DWORD)i._Mynode();
Whatever a DWORD is, why would you want to use it to store an iterator? |
A std::map::iterator is undoubtedly not a POD type.
--
Ian Collins. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|