Hi - I am having trouble creating an array of structures.
Here is what I have:
MLStructure structArray = new MLStructure(id, new int[] {3, 1});
MLStructure structMember = new MLStructure(id, new int[] {1, 1});
structMember["field"] = new MLInt32("field", new int[] {100}, 1);
structAray[id, 0] = structMember;
I thought this would assign a structure "structMember" to the first position in the structArray, but it does not and just makes structArray an empty double.
Any help would be greatly appreciated. Thanks!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi - I am having trouble creating an array of structures.
Here is what I have:
MLStructure structArray = new MLStructure(id, new int[] {3, 1});
MLStructure structMember = new MLStructure(id, new int[] {1, 1});
structMember["field"] = new MLInt32("field", new int[] {100}, 1);
structAray[id, 0] = structMember;
I thought this would assign a structure "structMember" to the first position in the structArray, but it does not and just makes structArray an empty double.
Any help would be greatly appreciated. Thanks!
Its easier than you think:
I also have added some lines at the bottom of the [Usage Examples].
Related
Wiki: Usage Examples