Ich habe "Error Reading Zeichen von String-Fehler" in Runtime. Und es ist keine Handhabung mit Versuch fangen,Fehler beim Lesen von Zeichen der Zeichenfolge - VC++
void process(const BYTE* pBodyIndexBuffer){
m_pCoordinateMapper->MapCameraPointToDepthSpace(m_pJoints[JointType_ShoulderLeft].Position, &p);
dx = static_cast<int>(p.X + 0.5);
dy = static_cast<int>(p.Y + 0.5);
try
{
if (p.X < 500 && p.X >= 0 && p.Y <= 410 && p.Y >= 0)
{
pPoint = pBodyIndexBuffer[dx + (dy*cDepthWidth)];
while (1) {
if (pPoint == 0xff) break;
pPoint = pBodyIndexBuffer[dx + (dy * cDepthWidth)];
dx -= 1;
dy -= 1;
p.X -= 1;
p.Y -= 1;
OutputDebugString(L"Moved \n");
}
}
m_pBodyEdgeswidth[ShoulderLeft] = getDistance(m_pJoints[JointType_ShoulderLeft].Position, p, distance);
}
catch (const std::exception&)
{
OutputDebugString(L"Error Occured");
}
}
Ich stellte den Teil des Codes zur Verfügung. Hier ist die Frage, die ich bin vor,
Bitte erläutern Sie, wie Sie dieses Problem zu beheben.
Aber manchmal beginnt es ohne Fehler zu laufen. wie ich vorbei ist,
BYTE *bodyIndex = NULL;
cm->getBodyIndexStream(&bodyIndex);
if(bodyIndex) process(bodyIndex);
Vielen Dank im Voraus.