The "," operator in for()s involving STL iterators

Bryan W. Headley bheadley@interaccess.com
Sun Dec 12 08:36:00 GMT 1999


I ran into problems with 2.95.2, egcs-19991208 (2.96) snapshot, and
2.9-codefusion-990706...

I have a for loop,

for ( int i = 0, vector<double>::iterator iter = a.start();
        iter != a.end();
       iter++, i++ )
{
    cout << (*iter) << endl;
}

Note the compound statement creating int i and the iter. A series of
errors ensued as I moved the statements around ( attached )



--
____               .:.                 ____
Bryan W. Headley - bheadley@interaccess.com


-------------- next part --------------
A non-text attachment was scrubbed...
Name: report
Type: text/x-c
Size: 6056 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-bugs/attachments/19991212/f467a7b4/attachment.bin>


More information about the Gcc-bugs mailing list