Rupert Rawnsley's WebLog
I've started so I'll finish.
Thursday, November 03, 2005
Initialize STL container classes
Ever wanted to initialize a map container as easily as a built-in array? The
boost assignment library
has the solution:
map<int,int> bob = map_list_of(1,2)(2,3)(3,4)(4,5)(5,6);
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment