On 21/10/2014 at 08:49, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R16
Platform: Windows ;
Language(s) : C++ ;
---------
Hi,
I'm having trouble with R16 iterators.
I must first confess that I don't use iterators in C++ because I think it's very ugly looking code. But I would like to force myself to use them more often.
This code yells at me that <BaseArray<Int> is not a template.
I do have #include "c4d_misc.h" in my code. Do I need to write my own template?
How do I make this work?
maxon::BaseArray<Int> myarr;
for (maxon::AutoIterator<BaseArray<Int> > it(myarr); it; ++it)
{
//... do something with *it or it->
}
Can someone also please post an example how to use an R16 iterator to iterate the objects in the hierarchy?
Thanks,
-ScottA