Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Flyff > Flyff Private Server
You last visited: Today at 19:12

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Help]in CWndFlyCoupon::ReOrderCouponVector()

Discussion on [Help]in CWndFlyCoupon::ReOrderCouponVector() within the Flyff Private Server forum part of the Flyff category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Mar 2018
Posts: 34
Received Thanks: 3
Question [Help]in CWndFlyCoupon::ReOrderCouponVector()

in vs2017 i was stuck with this code.



i never use make_pair before but if i was correct make_pair should be have 2 parameter for it ?

make_pair(x1,x2);

but <DWORD,CouponList> will can't complete in this function in vs2017 don't know why ?



finally i fix it
Code:
m_vecCouponList.push_back(std::make_pair(it->first, it->second));
-...-
Barameu is offline  
Old 04/19/2018, 02:14   #2
 
elite*gold: 294
Join Date: Jun 2009
Posts: 407
Received Thanks: 587
std::make_pair<type, type> was changed to std::make_pair() as it takes type from values passed, in C++ 11

You can also do std:air<type, type>(val, val) if you dont want to use std::make_pair.
Avalion is offline  
Thanks
2 Users
Old 04/19/2018, 09:49   #3
 
elite*gold: 0
Join Date: Mar 2008
Posts: 665
Received Thanks: 227
You can alternatively use emplace or emplace_back. Instead getting the source to copy into the containers, it pass the parameters to the constructor of the object.
When using make_pair, a std:air<a, b> is created and a copy of the pair is created, instead when using emplace/emplace_back a reference to the a and b object is done on the constructor of the value_type object.
alfredico is offline  
Thanks
2 Users
Reply


Similar Threads Similar Threads
[HELP]HELP HELP HELP[HELP]
09/23/2013 - Facebook - 3 Replies
GUYS ^^ THIS IS A HELP THREAD NOT REQUEST THREAD BUT YOU CAN CONSIDER IT AS REQUEST THREAD DOES ANYONE OF YOU KNOW THE AUTO SUBMIT PHP CODE? THANKS!
[HELP][HELP][HELP][HELP]!!
09/11/2009 - Soldier Front - 3 Replies
Microsoft Visual C++ Run time error! :(:( **HELP ME PLEASE!!***
help help help help help help
06/28/2009 - Say Hello - 0 Replies
how i can dowmload Mangos 6385 ??????????????????????????????????? please give me the limk i can't see that i know it is in www.elitepvpers.com/.../153716-release-mangos-relea ses-blackscorpian-win32-2-4-3-a.html - but give me link sent it to my email plz



All times are GMT +2. The time now is 19:12.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.