Mathias Fröhlich wrote:

That is something which is, I believe, missinterpreted by some compilers.
You have a constant value and as such it cannot change. Initial assignment is a change and so you cannot assign that one.
Your compiler seems to allow such an assignment for static members, but not for nonstatic members.

It can be done the following way:

In the header file:

class FOO {

  const char *ptr;

In the cpp file:

const char *FOO::ptr = "dummy text";


Flightgear-devel mailing list

Reply via email to