FILE *file = NULL; char path[]="D:\\Data\\Pos.csv"; CTime m_tDateTime; m_tDateTime = m_tDateTime.GetCurrentTime(); CString strTime = m_tDateTime.Format("%Y-%m-%d %H:%M:%S"); if (NULL != (file=fopen(path,"a"))) { fprintf(file,"%.3f,%.3f,%s",x,y,bexg?"\n":""); } if(file != NULL) fclose(file);
时间: 2024-11-05 18:45:29