Jump to content
  • Advertisement
Sign in to follow this  

Error from std::vector emplace_back in VS2010

This topic is 2017 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Am I doing something wrong here?


int generateNICs(std::vector<DWORD> &addrList, std::vector<ActiveNIC> &nics, const char* host, const char* path) {
  for(size_t i = 0; i < addrList.size(); ++i) {
    nics.emplace_back(addrList, host, path);
    if(nics.back().failFlag) {nics.pop_back();}
  return 0;


I'm getting:


error C2660: 'std::vector<_Ty>::emplace_back' : function does not take 3 arguments


The constructor prototype for ActiveNIC is:


ActiveNIC(DWORD localAddr, const char* host, const char* path);


According to my understanding of the documentation this code should be correct. What am I missing here?


Thanks in advance for any advice.

Share this post

Link to post
Share on other sites



Alright. I'm pretty much done with 2010.


Let's see how awful 2012 is then.


Thanks, frob.

Edited by Khatharr

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!