Thanks that works.
Buy why that works?
Max
On 8/5/07, "JOAQUIN LOPEZ MU?Z"
Hi I have a
struct People { const char* fname_; const char* lname_; unsigned int id; }
I want to create an array of 3 people.
boost::array
= { {"Chun", "Wang", 1441}, {"Chia", "Wang", 1443}, {"Ta", "Wang", 1445} }; I get a compile time error too many initializer.
Use an added level of brace enclosing: {{ {"Chun", "Wang", 1441}, {"Chia", "Wang", 1443}, {"Ta", "Wang", 1445} }}; See http://boost.org/doc/html/array/rationale.html for more details. HTH, Joaquín M López Mu?oz Telefónica, Investigación y Desarrollo _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users