<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
Hi everyone,<br>I'm trying to use iterators but I have a "Floating Point Exception" Error.<br><br>I modify a little my code to debug it and I discover that the error is in the following lines:<br><br>[...]<br><br>for (DskIt.GoToBegin(), DFltIt.GoToBegin(), DSubIt.GoToBegin();!DFltIt.IsAtEnd(); ++DskIt, ++DFltIt, ++DSubIt)<br> { <br> if(DFltIt.Get() < DSubIt.Get()) <br> {<br> std::cerr << " Ok ;-)"<< std::endl; // DskIt.Set(1);<br> }<br> else<br> {<br> std::cerr << "Not ok ;-("<< std::endl; // DskIt.Set(0);<br> }<br> }<br><br>[...]<br><br>To debug my code I added the std::cerr(...) lines (my right lines are temporarily commented) and I have this output:<br><br>-----------------------------------------------------------------------------------------------------<br>daniela@daniela-laptop:~/Scrivania/Dist/bin$ ./Dist3 IN.dcm OUT.dcm<br> Ok ;-)<br>Floating point exception<br>-----------------------------------------------------------------------------------------------------<br><br>It means that the loop runs corretly the first time, but after there is an error. I think that there is something about iterators' use because I'm a starter...<br><br>Thanks everyone who'll help me,<br><br>Daniela<br><br>                                            </body>
</html>