// This example compiles using the new STL from ObjectSpace, Inc. // STL is the EASIEST to use STL that works on most platform/compiler // combinations, including cfront, Borland, Visual C++, C Set++, ObjectCenter, // and the latest Sun & HP compilers. Read the README.STL file in this // directory for more information, or send email to info@objectspace.com. // For an overview of STL, read the OVERVIEW.STL file in this directory. #include #include int main () { { cout << "vectors:" << endl; os_my_allocator alloc; vector v3 (alloc); v3.push_back (42); vector v4 (alloc); v4.push_back (42); } { cout << "bit_vectors:" << endl; os_my_allocator alloc; bit_vector v1 (alloc); v1.push_back (1); } { cout << "deques:" << endl; os_my_allocator alloc; deque d (alloc); d.push_back (42); } { cout << "lists:" << endl; os_my_allocator > alloc; list l (alloc); l.push_back (42); } { cout << "sets:" << endl; os_my_allocator > alloc; set > s (alloc); s.insert (42); } { cout << "maps" << endl; os_my_allocator > > alloc; map > m (alloc); m[4] = 2.0; } return 0; }