Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
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
Common elements in 3 sorted vectors with extra space
Policy based smart pointer
Treap (making range queries(that are not possible on seg_Trees) possible with no effort) : (863D)
mine
Dar
Reverse a String
series
RandomMessage
Speed
MINVEST