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

Threaded View

  1. #1
    Join Date
    Aug 2002
    Posts
    309

    STL error - with declaration move to other .h file, please help.

    In .cpp file I write:

    Code:
    #include "file.h"
    #include <map>; 
    using namespace std; 
    
    class CPartHolder; 
    
    typedef map<int,CPartHolder*> type_MapPartHolder; 
    type_MapPartHolder mapPartHolder; 
    
    class CPartHolder 
    { 
    };

    works fine
    but if I move or add
    declarations:

    file.h :

    Code:
    #include <map>; 
    using namespace std;

    into .h file
    appeared STL error
    "operator new not defined for...."

    What is the reason of this and gow to resolve
    such a problem?

    Thanks
    Last edited by vgrigor3; March 6th, 2003 at 12:10 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