错误C2661:'CObject :: operator new':没有重载函数需要4个参数visual studio相关的问题 [英] error C2661: 'CObject::operator new' : no overloaded function takes 4 arguments visual studio related issue

查看:341
本文介绍了错误C2661:'CObject :: operator new':没有重载函数需要4个参数visual studio相关的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


这不是关于C ++,但我的问题是关于visual studio 2013.当我尝试编译时,我的所有.cpp文件都出现此错误。我没有对我的代码进行任何更改,我已经完成了以下步骤来解决问题无效



1)删除我的代码库并查看一个干净的版本



2)使用update 5重新安装visual studio 2013终极版



3 )重置我的visual studio设置并导入我的同事设置



4)代码修订历史记录未显示对operator new定义的任何修改



有趣的是我的所有同事都能够编译,我能够在发布模式下编译。这个问题只存在于调试模式。我希望有人之前遇到过这个问题解决方案。

解决方案

在10/29/2017 1:57 PM,vramac写道:


这不是关于C ++,但是我的问题是关于visual studio 2013.当我尝试编译时,我的所有.cpp文件都出现了这个错误。我还没有做任何更改我的代码,我已完成以下步骤来解决问题无济于事


搜索您的代码


< pre lang ="x-cpp"style ="font-family:Courier New,Courier,mono">#define new DEBUG_NEW

可能在stdafx.h中,或者用于预编译头文件的任何文件。参见


http s://stackoverflow.com/questions/5421754/what-is-the-usage-of-debug-new-and-file?



This isn't about C++ but my issue is about visual studio 2013. I get this error in all of my .cpp files when i'm trying to compile. I have not made any changes to my code and i have done the following steps to remedy the issue to no avail

1)Delete my code base and check out a clean version

2) Reinstall visual studio 2013 ultimate with update 5

3)Reset my visual studio settings and imported my colleagues settings

4)Code revision history doesn't show any modifications to definition of operator new

Funny thing is all my colleagues are able to compile and I'm able to compile in release mode . This issue exists only in debug mode. I'm hoping someone has encountered this before and has a solution for this.

解决方案

On 10/29/2017 1:57 PM, vramac wrote:

This isn't about C++ but my issue is about visual studio 2013. I get this error in all of my .cpp files when i'm trying to compile. I have not made any changes to my code and i have done the following steps to remedy the issue to no avail

Search your code for

#define new DEBUG_NEW

Probably in stdafx.h , or whatever file you use for precompiled headers. See also

https://stackoverflow.com/questions/5421754/what-is-the-usage-of-debug-new-and-file?


这篇关于错误C2661:'CObject :: operator new':没有重载函数需要4个参数visual studio相关的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆