Sparx Systems Forum
Enterprise Architect => General Board => Topic started by: OT on June 11, 2014, 06:23:41 pm
-
I have a strange problem with the
-> Code Engineering -> Synchronize Package with code...
function in EA.
Say, I have a simple class A:
class A
{
public:
A();
virtual ~A();
};
A::A()
{
}
A::~A()
{
}
Everything goes fine when I use the "Synchronize Package with code..."
function. Next I add an additional constructor which passes a reference
to a C array of size 2:
class A
{
public:
A();
A(BYTE (&bInfo)[2]);
virtual ~A();
private:
BYTE (&m_bInfo)[2];
};
A::A()
{
}
A::A(BYTE (&bInfo)[2])
: m_bInfo(bInfo)
{
}
A::~A()
{
}
The compiler is totally happy with this construct.
EA however generates a parsing error: "Unexpected Symbol: ;"
How can I fix this?
-
There seems to be a semi-colon outside a closing bracket, although it is there in both snippets of code. Does that make a difference?
class A
{
public:
A();
A(BYTE (&bInfo)[2]);
virtual ~A();
private:
BYTE (&m_bInfo)[2];
[highlight]};[/highlight]
A::A()
{
}
-
References to arrays are a little tricky. (How to model in part)
We recommend using a typedef to allow EA to accept this.