Hi all,

we are working in an embedded environment. We do care where variables are placed, RAM or ROM.

We would like to know how we can force the compiler to put a const object in ROM.

Code:
class Foo
{

};

class Bar : public Foo
{
public: 
    unsigned char var;
};

Bar const ParamConfig1={1};
Bar const ParamConfig2={2};
As long as Bar is not derived from Foo the objects are placed in ROM, if derived they end up in RAM.

Can anyone help us out?

Jef