Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6234085
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T10:25:10+00:00 2026-05-24T10:25:10+00:00

I have created Dialog Based application in MFC (VS 2008).When I do #include in

  • 0

I have created Dialog Based application in MFC (VS 2008).When I do “#include” in Dlg.cpp it showing following error.

Is Some Component is missing in the VS 2008 Installation

c:\program files (x86)\microsoft visual studio 9.0\vc\include\xmemory(43) : 
error C2665: 'operator new' : none of the 5 overloads could convert all the argument types

1>        c:\program files (x86)\microsoft visual studio 9.0\vc\include\new.h(85): could be 'void *operator new(size_t,const std::nothrow_t &) throw()'

1>        c:\program files (x86)\microsoft visual studio 9.0\vc\include\new.h(93): or       'void *operator new(size_t,void *)'

1>        while trying to match the argument list '(const char [70], int)'

1>        c:\program files (x86)\microsoft visual studio 9.0\vc\include\xmemory(145) : see reference to function template instantiation '_Ty *std::_Allocate<char>(size_t,_Ty *)' being compiled

1>        with

1>        [
1>            _Ty=char
1>        ]

1>        c:\program files (x86)\microsoft visual studio 9.0\vc\include\xmemory(144) : while compiling class template member function 'char *std::allocator<_Ty>::allocate(std::allocator<_Ty>::size_type)'

1>        with
1>        [
1>            _Ty=char
1>        ]

1>        c:\program files (x86)\microsoft visual studio 9.0\vc\include\xstring(2216) : see reference to class template instantiation 'std::allocator<_Ty>' being compiled

1>        with
1>        [
1>            _Ty=char
1>        ]

1>Build log was saved at "file://c:\Users\Public\Documents\Proj\STL1\STL1\Debug\BuildLog.htm"
1>STL1 - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T10:25:10+00:00Added an answer on May 24, 2026 at 10:25 am

    Any STL includes in your MFC project should be included prior to the definition of DEBUG_NEW. This was a problem in the past (no longer seems to be, as I cannot reproduce it in VS 2010).

    // myfile.cpp
    #ifdef _DEBUG
    #define new DEBUG_NEW
    #endif
    
    // This will cause the error
    #include <vector>
    

    Whereas

    // myfile.cpp
    // will work OK
    #include <vector>
    
    #ifdef _DEBUG
    #define new DEBUG_NEW
    #endif
    

    DEBUG_NEW is a microsoft specific extension that helps to find memory leaks in debug versions of the application. It can be very useful in certain cases.

    It’s defined in afx.h as:

    void* AFX_CDECL operator new(size_t nSize, LPCSTR lpszFileName, int nLine);
    #define DEBUG_NEW new(THIS_FILE, __LINE__)`
    

    It’s helps to provide tracking of memory allocated and when a leak is detected will give you the file and line number where the allocation took place.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an MFC-driven dialog-based application created with MSVS2005. Here is my problem step
I have to create a dialog based application, instead of old CFormView type of
I have dialog created like this $('#add_error').click(function(e) { $('<div>') .load('/someaction/format/html/') .dialog({ title: 'Some title',
I have a modal dialog that is created with the following: procedure TFormCompose.createParams(var Params:
This is happening on Vista. I created a new dialog based MFC project to
I wish to have a small dialog based application which is passed command line
I have created a Cocoa document based picture drawing application. I want that the
I have created a custom dialog for Visual Studio Setup Project using the steps
I have a dialog box, created with the code javascript and HTML generated below.
hello all I have a small dialog which I created dynamically, which has a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.