CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Threaded View

  1. #1
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,635

    [RESOLVED] What's wrong with this STL code

    Compiled in 2008, gives error C2275, illegal use of this type as an expression in 2012
    Code:
    template 
    <
    	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()));
    }
    Never mind. Apparently you need to #include <iterator> now.
    Last edited by GCDEF; June 6th, 2013 at 01:12 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured