exportfile.cpp
来自「RFID温度签的源码」· C++ 代码 · 共 54 行
CPP
54 行
#include "StdAfx.h"
#include "ExportFile.h"
CExportFile::CExportFile(void) :
m_pFile( NULL )
{
}
CExportFile::~CExportFile(void)
{
CloseFile();
}
BOOL CExportFile::OpenCreateFile( const char* strFileName )
{
if( m_pFile != NULL )
{
CloseFile();
}
m_pFile = fopen( strFileName, "a" );
if( m_pFile == NULL )
{
DWORD dwError = GetLastError();
return FALSE;
}
return TRUE;
}
BOOL CExportFile::CloseFile()
{
if( m_pFile )
{
fclose( m_pFile );
}
return TRUE;
}
BOOL CExportFile::AddItem( const char* strItem )
{
fprintf( m_pFile, strItem );
fprintf( m_pFile, "," );
fflush( m_pFile );
return TRUE;
}
BOOL CExportFile::EnterLine()
{
fprintf( m_pFile, "\n" );
fflush( m_pFile );
return TRUE;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?