   Initializing dynamic arrays of struct?
  Is it possible to initialize dynamic arrays of structures in a similar way to initializing normal arrays of structures?For example:struct thing{int a;int b;};...thing* balloon = new thing[3];//how is this initialized?  if it weren't a pointer-to-array-of-struct, it would be//something like...ballon = {  {2, 5},  {4,7},  {13,22}};but how do i initialize the dynamic array of structures?  is it initialized  just like a normal array?   
  Yes, once you call new thing[3], there will be memory allocated for 3 things. What's in that memory, is unknown. Accessing your things is done by doing this:balloon[0].a = 10;balloon[0].b = 12;If you would create a default constructor for your thing struct a la:struct thing{    thing():a(0), b(0) {}    int a;    int b;};Then both a and b are set to 0. However, if you don't, the memory will be filled what was there at the moment of allocation of the memory.Toolmaker   ;  No, this is not possible as far as I know since the compiler doesn't know how big the array will be.  If you already know the size you want it to be, don't make it dynamic.Edit:  I think I misunderstood your question.  If I did, the above answer is better.  The thing is with a static array, the compiler knows how much space you have.  With dynamic, you have to directly set the (correct and not out-of-bounds) memory yourself.   ;  One way to do it is to loop through all the newly created "things" and initialize each one with some data.  Here's an example:struct thing{int a;int b;};...const int dataSize = 3 * 2; // 3 things, 2 ints per thingint data[ dataSize ] = { 2, 3, 1, 2, 8, 9 };thing* pThings = new thing[3];int dataIndex = 0;for( int i = 0; i < 3; ++i ){   pThings.a = data[ dataIndex++ ];pThings.b = data[ dataIndex++ ];};  std::vector:struct thing {   int a,b;   thing( int a, int b ) : a(a), b(b) {}};// initialise everything the samestd::vector<thing> balloon(3,thing(0,0));// or everything differentlystd::vector<thing> balloon;balloon.push_back(thing(1,1));balloon.push_back(thing(2,2));balloon.push_back(thing(3,3));// or (with no constructor)thing data[] = {  {2, 5},  {4,7},  {13,22}};std::vector<thing> ballon(data,data + sizeof(data) / sizeof(data[0]));// finally, depending on what you are doing, initialise from a file:std::istream &operator>>( std::istream &in, thing &t ){    in >> t.a >> t.b;    return in;}std::vector<thing> balloon;std::ifstream file("balloon_data.txt");thing t;while( file >> t ){    balloon.push_back(t);};  If you want something vaguely resembling { } initialization syntax, you can use the Boost Assignment library (or something similar):std::vector<thing> my_things = boost::assign::list_of    (thing(2 ,5 ))    (thing(4 ,7 ))    (thing(13,22));