Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

C++ Classes with Variable Length Array Members

1 view
Skip to first unread message

Nordlöw

unread,
Oct 15, 2009, 9:15:18 AM10/15/09
to
GCC's C Extensions gives us zero and variable length arrays.
Is it possible to get variable length arrays as members ("by-value")
in C++ classes aswell, something like:
class string255
{
private:
char size;
char val[size];
}:

I guess it all boils downto how C++ allocates a class.
Can we give gcc hints about this somehow?
/Nordlöw

0 new messages