help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

C++ Classes with Variable Length Array Members


From: Nordlöw
Subject: C++ Classes with Variable Length Array Members
Date: Thu, 15 Oct 2009 06:09:40 -0700 (PDT)
User-agent: G2/1.0

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]