This is the original code of K1
NUI_SKELETON_FRAME standardization (NUI_SKELETON_FRAME skeletonFrame) {
for (int i=0; iFor (int r=0; R & lt; 20; R++) {
SkeletonFrame. SkeletonData [I] SkeletonPositions [r]=bz (skeletonFrame. SkeletonData [I] SkeletonPositions [r], skeletonFrame. SkeletonData [I] SkeletonPositions [0]).
}
}
Return skeletonFrame;
}
I rewrite the K2 code after
IBodyFrameReader standardization (IBodyFrameReader skeletonFrame) {
for (int i=0; i <body_COUNT; I++) {
For (int r=0; R & lt; 25. R++) {
SkeletonFrame. SkeletonData [I] SkeletonPositions [r]=bz (skeletonFrame. SkeletonData [I] SkeletonPositions [r], skeletonFrame. SkeletonData [I] SkeletonPositions [0]).
}
}
Return skeletonFrame;
}
This is where the program error
CodePudding user response:
Using pointer formCodePudding user response:
Don't know much about the guidanceCodePudding user response:
You return is an object that is pure virtual object classes, although the memory can be changed, but no data itself does not conform to the grammar specification.There was a bug on the k1, k2 on a more strict check, you will pass it.
Can change to return a pointer or reference
NUI_SKELETON_FRAME standardization (NUI_SKELETON_FRAME skeletonFrame)
Change
NUI_SKELETON_FRAME & amp; standardization (NUI_SKELETON_FRAME skeletonFrame)
Or
NUI_SKELETON_FRAME * standardization (NUI_SKELETON_FRAME skeletonFrame)//attention to Pointers, ruturn statements need to use & amp; Pick up address.
At the back of the function is similar to
CodePudding user response:
But deny the K2 NUI_SKELETON_FRAM ah, write down according to your tip the NUI_SKELETON_FRAME is undefined identifiersCodePudding user response:
Good big because in