dcsimg
Login | Register   
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.


advertisement
 

Tackle Common Programming Tasks Using the New <tuple> Library

Tuples are fixed size collections of heterogeneous objects, and they are being added to the C++ standard. Learn how this powerful facility can help you simplify several common programming tasks.


advertisement

WEBINAR:

On-Demand

Application Security Testing: An Integral Part of DevOps


he C++ standards committee is now working on updates and enhancements to the Standard Library. Tuple types are one of the recent additions to the standard. A tupleis a fixed size collection of heterogeneous objects. Tuple types are very powerful and can help you simplify several programming tasks.


How can you simulate multiple return types for a single function? How do you assign and compare multiple values simultaneously?


Use the <tuple> library to define tuple objects and manipulate them.

Author's Note: Thus far, my 10-Minute Solutions have relied solely on C++98 features that every decent compiler should support. However, the <tuple> library isn't included in your IDE's Standard Library yet. Therefore, you will need to download this library from Boost if you wish to compile the code samples included here. Even if you'd rather not install new libraries on your computer, future releases of your compiler will support <tuple> anyway.


Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date