Jump to content
  • Advertisement
Sign in to follow this  
Khatharr

Error from std::vector emplace_back in VS2010

This topic is 1962 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
Advertisement

*weeping*

 

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!