本文整理汇总了C++中ofFile::flush方法的典型用法代码示例。如果您正苦于以下问题:C++ ofFile::flush方法的具体用法?C++ ofFile::flush怎么用?C++ ofFile::flush使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ofFile
的用法示例。
在下文中一共展示了ofFile::flush方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: writeLog
void testApp::writeLog(){
//-------------------------
// Writing machine learning data
if(bTracking && bCalibrated){
state = 0; // state is used for machine learning mark-up
if(keys['1']) state = 1;
if(keys['2']) state = 2;
// if(keys['3']) state = 3;
logFile << trackers[0].lerpedPos.x << " " << trackers[0].lerpedPos.z << " "
<< trackers[1].lerpedPos.x << " " << trackers[1].lerpedPos.z << " "
<< trackers[2].lerpedPos.x << " " << trackers[2].lerpedPos.z << " " << state << endl;
cout << trackers[0].lerpedPos.x << " " << trackers[0].lerpedPos.z << " "
<< trackers[1].lerpedPos.x << " " << trackers[1].lerpedPos.z << " "
<< trackers[2].lerpedPos.x << " " << trackers[2].lerpedPos.z << " " << state << endl;
logFile.flush();
}
}