fix conversion warning
Avoid error: cannot take the address of an rvalue
Add missing #include <cstdlib>
In c++11 the conversion from ostream to bool must be explicit
Don't assume you can create an std::vector::iterator from the address of an element (in some implementation you can't)