hi all
i found the solution
though both has list<float*>::iterator type, when i use it in the for
loop, i take the begin and end of the respective lists
for eg
my working code
list<float*>::iterator i,j;
for(k=0;k<10;k++){
for(i=scan[k].begin();i<scan[k].end();i++){
//do my work here
}
}
for(j=AET.begin();j<AET.end();j++){
//do my work here
}
i do not have my full code with me now,
so plz forgive me for any syntax error.
the reason y i need an array of (pointers to lists) is that
iam implementing scan line polygon fill algorithm for my class
assignment,
and the scan array is the edge table datastructure
and the AET list is the active edge table datastructure
hope i ve made my intentions clear
[...]
Do you mean you need this:?
typedef std::list<std::auto_ptr<float> > list_t;
That's not legal. You're not allowed to instantiate a list with
auto_ptr.
But it is not good to store auto_ptr in list.
It's not allowed by the standard. It's undefined behavior.
--
James Kanze (GABI Software) email:
[email protected]
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34