例如,如何在 C++/CLI 中创建指向数据成员的指针
ref class team
{
List<teamMember^> members;
teamMember^ leader; //the aim is to make it a pointer to an element in the list
void changeLeader(teamMember^% member) //member is an element from members
{
leader=member; //doesn't reference and %member gave an error
}
};