Benny
Benny

Reputation: 8815

Managed class definition in C++\CLI

Can it be defined in .h and .cpp file or it has to be defined in a single .h file?

Upvotes: 1

Views: 1128

Answers (1)

Andy Dent
Andy Dent

Reputation: 17969

You can define in just a .h or split the class definitions just as you would for traditional C++.

Note that for properties you will need to nest your get and set methods with proper scoping, eg:

void MyModel::AProperty::set(bool b)
{
    mBackingVariableForAProperty = b;
}

Upvotes: 2

Related Questions