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?
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;
}
精彩评论