Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

7
  • 1
    if you are not going to change the size of ints after initialization, consider using tr1 array.
    – zr.
    Commented Feb 10, 2010 at 11:21
  • 1
    @zr, you have me curious... if I needed fixed size, could I not use plain old arrays themselves? Looking at tr1 array right now... Commented Feb 10, 2010 at 11:53
  • 2
    tr1::array is useful because ordinary arrays don't provide the interface of STL containers
    – Manuel
    Commented Feb 10, 2010 at 12:21
  • Changed the title to make this explicitly a C++03 question. It seemed easier than going through and fixing all the answers to make sense with the new standard C++.
    – T.E.D.
    Commented Feb 24, 2014 at 16:12
  • This is called list initialization. Commented Aug 11, 2018 at 8:00