U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » U++ Core » no true Iterator support in Upp???
Re: no true Iterator support in Upp??? [message #28963 is a reply to message #28957] Wed, 29 September 2010 13:44 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14291
Registered: November 2005
Ultimate Member
[quote title=kohait00 wrote on Wed, 29 September 2010 05:28]
Vector<int> vi;
Array<int> ai;

Vector<Iterator<int> > iti;
iti << vi.GetIter();
iti << ai.GetIter();

for(int i = 0; i<iti.GetCount(); i++)
{
   Iter<int> & it = iti[i];
   while(it.MoveNext())
   {
   int& ii = it.Current();
   //do stuff with ii, dont care from where element came from 
   }
}


Yes, but indicies are so simple and handy (and effective too).

Also, "enumerator" is not "iterator" Smile
 
Read Message icon5.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Handle a RGBA* with ImageBuffer
Next Topic: Animate does not really animate
Goto Forum:
  


Current Time: Fri Sep 25 02:07:22 GMT+2 2026

Total time taken to generate the page: 0.00708 seconds