输出调试数据 代码段

char* pszFileName="C://myfile.txt"; CStdioFile myFile; CFileException fileException; if(myFile.Open(pszFileName,CFile::typeText|CFile::modeReadWrite),&fileException) { static int i = 0; myFile.Seek(0,CFile::end); CString strLineNum; strLineNum.Format("第%d行",++i); myFile.WriteString(strLineNum); CString strOrder; strOrder.Format("rfAngle:%f rkAxis:%f %f %f CamOrient:%f %f %f %f rkAxisAft:%f %f %f q:%f %f %f %f/n" ,rfAngle.valueDegrees(),rkAxis.x,rkAxis.y,rkAxis.z,CamOrient.w,CamOrient.x,CamOrient.y,CamOrient.z ,rkAxisAft.x,rkAxisAft.y,rkAxisAft.z,q.w,q.x,q.y,q.z); // strOrder.Format("q: %f,%f,%f,%f mCamPos: %f,%f,%f mCamOri: %f,%f,%f,%f/n",q.w,q.x,q.y,q.z, // mCam->getPosition().x,mCam->getPosition().y,mCam->getPosition().z, // mCam->getOrientation().w,mCam->getOrientation().x,mCam->getOrientation().y,mCam->getOrientation().z); myFile.WriteString(strOrder); } else { TRACE("Can't open file %s,error=%u/n",pszFileName,fileException.m_cause); } 

你可能感兴趣的:(输出调试数据 代码段)