Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
list_of pair strings
#include <boost/assign/list_of.hpp> // for 'map_list_of()' #include <boost/assert.hpp> #include <map> #include <list> #include <boost/foreach.hpp> using namespace std; using namespace boost::assign; // bring 'map_list_of()' into scope int main() { typedef pair<std::string,std::string> pairString_t; std::vector<pairString_t> aVectorPairs = list_of< pairString_t > ("A","B") ("C","D") ("E","F"); BOOST_FOREACH(pairString_t& aPair, aVectorPairs) { std::cout << aPair.first << "-" << aPair.second << std::endl; } }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
1744. Can You Eat Your Favorite Candy on Your Favorite Day?
fastest input taking for large files
Perf measurement
Making pyramid using nested loop 2/2
reverse function
PLoshtina na krug
How to access member function of a class using scope
Metodos
shifting
Sangharsh.vhawale
Please log in to post a comment.