June 6th, 2013, 01:41 PM
[RESOLVED] What's wrong with this STL code
Compiled in 2008, gives error C2275, illegal use of this type as an expression in 2012
Never mind. Apparently you need to #include <iterator> now.
class tSTLContainer // The type of STL container to copy.
void STLCopy (tSTLContainer& outDest, const tSTLContainer& inSource)
copy(inSource.begin(), inSource.end(), insert_iterator<tSTLContainer>(outDest, outDest.begin()));
Last edited by GCDEF; June 6th, 2013 at 02:12 PM.
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.