VS2010中的0参数未实现emplace函数 [英] emplace functions are not implemented to 0 parameter in VS2010

查看:44
本文介绍了VS2010中的0参数未实现emplace函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨 


我正在使用VS2010 IDE,当我尝试编译正在使用矢量的emplace_back()函数的文件时,会显示以下错误。  ;


错误 20
错误C2660:'std :: vector< _Ty> :: emplace_back':函数不带0参数。


但在VS2012中编译相同的代码。


如果我们能为VS2010工作,请帮助我吗?








解决方案

< blockquote>

您好,


如果您需要准确的帮助,请告诉我们您的代码。


同时,我不相信它会编译在VS2012。


阅读文档:


VS 2010:
https://msdn.microsoft.com/en-us/library/dd647620(v=vs.100).aspx


VS 2012:
https://msdn.microsoft.com/en-us/library /dd647620(v=vs.110).aspx


问候,Guido


Hi 

I am using VS2010 IDE, when I was trying to compile the file which is using emplace_back() function for vectors, below error is displayed. 

Error 20 error C2660: 'std::vector<_Ty>::emplace_back' : function does not take 0 argument.

But the same code is compiled in VS2012.

Please help me  if we can make it work for VS2010 ?


解决方案

Hello,

show us your code if you want accurate help.

Meanwhile, I don't believe that it compiles in VS2012.

Read the documentation:

VS 2010: https://msdn.microsoft.com/en-us/library/dd647620(v=vs.100).aspx

VS 2012: https://msdn.microsoft.com/en-us/library/dd647620(v=vs.110).aspx

Regards, Guido


这篇关于VS2010中的0参数未实现emplace函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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