C++Talk.NET Forum Index C++Talk.NET
C++ language newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

save iterator as a DWORD

 
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++)
View previous topic :: View next topic  
Author Message
Guest






PostPosted: Fri May 11, 2007 9:11 am    Post subject: save iterator as a DWORD Reply with 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();

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





PostPosted: Fri May 11, 2007 9:11 am    Post subject: Re: save iterator as a DWORD Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++) All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.