Map containers

This is a discussion on Map containers within the C++ Programming forums, part of the General Programming Boards category; Standard containers by default place their contents on the free store. You can give them an allocator that allocates from ...

  1. #16
    The larch
    Join Date
    May 2006
    Posts
    3,573
    Standard containers by default place their contents on the free store. You can give them an allocator that allocates from some other place.
    I might be wrong.

    Thank you, anon. You sure know how to recognize different types of trees from quite a long way away.
    Quoted more than 1000 times (I hope).

  2. #17
    Registered User
    Join Date
    Mar 2009
    Posts
    43
    lol I wished I'd phrased my question that way first! That's all I needed to know really.... thanks very much!

  3. #18
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,892
    On a side note, it's not possible to write a standard-compliant allocator that allocates from the stack for a standard-compliant container. Not unless you basically take a huge block of stack and then do your own memory management within it.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Adding a Map to a program
    By Shogun32 in forum C++ Programming
    Replies: 1
    Last Post: 05-04-2009, 09:42 AM
  2. Polynomials and ADT's
    By Emeighty in forum C++ Programming
    Replies: 20
    Last Post: 08-19-2008, 08:32 AM
  3. New editor updates
    By VirtualAce in forum Game Programming
    Replies: 8
    Last Post: 11-05-2005, 02:26 PM
  4. Creating a map engine.
    By suzakugaiden in forum Game Programming
    Replies: 11
    Last Post: 06-21-2005, 05:06 AM
  5. Searching STL Map Inside STL Map Object :: C++
    By kuphryn in forum C++ Programming
    Replies: 2
    Last Post: 11-14-2002, 08:11 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21