using std::list<>::iterator?

This is a discussion on using std::list<>::iterator? within the C++ Programming forums, part of the General Programming Boards category; I had these statements in my prog:
Code:
#include <iostream>
#include <fstream>
#include <cmath>
#include <list>
using std::list;
using std::ofstream;
...

yeah that's what i figured. i guess it wouldn't have let me even declare an iterator if that was the case. anyway, i just had to hold down ctrl-z until it backed my prog up to where it was working okay. (how's that for debugging a program, haha!)

What does splice do? If it modifies mList (it appears that it might) then it is a mistake, because it would (possibly) invalidate your iterator. The basic rule is if you modify a container any iterator pointing into that container is not guaranteed to be valid afterwords.

What does splice do? If it modifies mList (it appears that it might) then it is a mistake, because it would (possibly) invalidate your iterator. The basic rule is if you modify a container any iterator pointing into that container is not guaranteed to be valid afterwords.