Yes. You can initialize them to all-0 by value-initializing the array
bop *pn = new bop[ 3 ]();
But in fact I would prefer to use std::string
and std::vector
like some commenter said, unless you need that struct to really be byte-compatible with some interface that doesn't understand highlevel structures. If you do need this simplistic design, then you can still initialize on the stack and copy over. For example to "initialize" the first element
bop b = { "bob babs", "mr.", "bobby", 69 };
memcpy(pn, &b, sizeof b);
Note that in C++0x you can say
bop *pn = new bop[3] {
{ "bob babs", "mr.", "bobby", 0xd00d },
{ ..., 0xbabe },
{ ..., 69 }
};