Thanks that works.
Buy why that works?
Max
On 8/5/07, "JOAQUIN LOPEZ
MU?Z" <joaquin@tid.es>
wrote:
-----
Mensaje original -----
De: chun ping wang <cablepuff@gmail.com>
Fecha:
Domingo, Agosto 5, 2007 7:09 am
Asunto: [Boost-users] boost array
problems.
Para: boost-users@lists.boost.org, solutions@josuttis.com
> 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<People, 3> = {
> {"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